I have this form that has a set of radio buttons. I can validate other fields but validate the radio button. Failed. I agree to my other fields like this
& lt; Div class = "form-group" ng-class = "{'has-error': (UserForm.originAcc. $ Invalid || user.Form.originAcc. $ Ancient) & amp; amp; and submit;}} & Lt; label class = "labelColor"> Source account no. & gt; Lt; / label & gt; & lt; id = "original acc" name = "original AAC" style = "margin: auto; Width: 100% "ng-model =" user Arizyn ACC "ng-options =" account account account at account "option option =" "& gt; - choose account -
I verify these areas with the use of the error class. How can I verify the radio button in the same way?
My Radio Button HTML
& lt; Label class = "label collar" & gt; & Lt; H5 & gt; & Lt; B & gt; Select the Standing Order Type & lt; / B & gt; & Lt; / H5> & Lt; / Label & gt; & Lt; Div class = "list" & gt; & Lt; Ion-radio ng-repeat = "item in client sidelist" ng-value = "item.value" ng-model = "userclient side" required & gt; {{Item.text}} & lt; / Ion-radio & gt; & Lt; / Div & gt;
radio button JS
$ scope.move = function () {var path; Switch ($ scope.user.clientSide) {case 'ftso': path = 'app / so / fundtransfer order'; break; // case 'osa': path = 'app / so / own'; break; Case 'utso': path = 'app / so / utility transfer order'; break; } $ Location.path (path); };
HTML part
& lt; Div class = "form-group" ng-class = "{'is-error': third partform.clainside.n $ invalid and third-party form.Sclineside.com $ dirty & amp; submitted (third parttime.client Side. $ Invalid & amp; amp;; thirdpartyfirm.quilasside.new) and amp; deposited} "ng-init =" data. Type = 'internal'; change transaction type ('internal'); hidefold (); Bankare (); "& gt; & Lt; Div class = "list" & gt; & Lt; Ion-radio ng-repeat = "item in accTypeList" name = "client side" id = "clientSide" ng-value = "item.value" ng-model = "data.type" ng-change = "transaction type Change (item .Value); hideFields (item.value); banksArray (); Pop (); "Required & gt; {{Item.text}} & lt; / Ion-radio & gt; & Lt; / Div & gt; & Lt; Span class = "help-inline" ng-show = "submit and user form. Client side $ error.required" & gt; Type can not be left unchecked. & Lt; / Span & gt; & Lt; / Div & gt;
JS part
$ scope.accTypeList = [{text: "***********", Value: " Internal "}, {text:" other bank ", value:" other "}]; $ Scope.transactionTypeChange = function (obj) {if (obj.localeCompare ('other') == 0) {$ scope.listOne = [{"id": "1", "name": "Transfer (SLIPS)" }, {"Id": "2", "Name": "Transfer (CEFTS)"}]; $ Scope.data.transtype = $ scope.listOne [0]; $ Scope.validateDestAccFlag = false; } And if (obj.localeCompare ('internal') == 0) {$ scope.listOne = [{"id": "1", "name": "************* *** "}]; $ Scope.data.transtype = $ scope.listOne [0]; ; $ Scope.validateAccFlag = true; $ Scope.validateDesitinationAccount ($ scope.data.origin, $ scope.data.beneAcc); }
Comments
Post a Comment