html – 离子单选按钮验证

前端之家收集整理的这篇文章主要介绍了html – 离子单选按钮验证前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在为我的应用程序使用ionic / angularjs做一个表单.我在所有领域都使用了验证.但我对单选按钮的验证无法正常工作.如果没有选择单选按钮,它会显示错误消息(就像它应该的那样)但即使我选择了一个单选按钮,它也会显示错误消息.我怎样才能解决这个问题?

或者如何设置默认选中的单选按钮?

我的表格

            
dio ng-model="choice" name="choice" id="choice" ng-value="'A'">Utility Standing Orderdio> dio ng-model="choice" name="choice" id="choice" ng-value="'B'">Own Account Standing Orderdio> dio ng-model="choice" name="choice" id="choice" ng-value="'C'">Third Party Fund Transfer Standing Orderdio> required && submitted)" >Standing Order Type Should Be Selected.
最佳答案
您必须在离子框架中设置单选按钮的默认值
请遵循以下代码: –

enter code here
dio ng-repeat="item in clientSideList" ng-value="item.value" 
             ng-model="data.clientSide"> {{ item.text }}
            dio>
        
原文链接:https://www.f2er.com/html/426535.html

猜你在找的HTML相关文章