For validation in Angular Js, first of all use 'required' attribute in the input control like..
Now restrict the save button so that it is clickable only when all the validation succeeds. Use
ng-disabled="myform.$invalid" where myform is the name of the form. Placing the input controls and save button under form tag is must
Doing this is sufficient to validate the form. If you want to give the user a required message then use a span like this..
No comments:
Post a Comment