extending AngularJS's $error to show server side form validation errors -
i thinking of returning validationerrors json object construction of controlname.$error server , on handler of server api calling angular.extend(myform,data.validationerrors).
specifically not sure when , how errors cleared... (maybe returning nulls valid fields help i.e. {ctrl.$error:null,ctrl2.$error:null,...} [in case maybe validationresults more suitable validationerrors
is there mutual practice on how display server side validation errors angularjs forms? sound reasonable , in angular spirit or going have problem this?
angularjs validation
No comments:
Post a Comment