Posts

Showing posts with the label form validation

Angular js hidden form validation work

Angular Js  form validation   1-Create a Form                   <form name="userForm" novalidate > 2-Add Bootstrap Class for Showing Error Messages to that Div              <div class="form-group"  ng-class="  {'has-error':! userForm.email.$valid &&(!userForm.$pristine || userForm.$submitted),  'has-success':userForm.email.$valid && (!userForm.$pristine || userForm.$submitted)       }       "> replace userForm with your form name. 3-Now Add the input field into your form                 <input type="email"  name="email"  class="form-control"  ng-model="main.email"                            ng-minlength="5"  ng-maxlength="20"  required="required"> here we are adding required  validation. minimum length 5 validation . maximum length 20 validation. 4-Now Finally we add validation one by one 1-when fo

AngularJs form validation in deep

AngularJs form validation || client side validation by angular js 1-Create a Form                   <form name="userForm" novalidate > 2-Add Bootstrap Class for Showing Error Messages to that Div              <div class="form-group"  ng-class="  {'has-error':! userForm.email.$valid &&(!userForm.$pristine || userForm.$submitted),  'has-success':userForm.email.$valid && (!userForm.$pristine || userForm.$submitted)       }       "> replace userForm with your form name. 3-Now Add the input field into your form                 <input type="email"  name="email"  class="form-control"  ng-model="main.email"                            ng-minlength="5"  ng-maxlength="20"  required="required"> here we are adding required  validation. minimum length 5 validation . maximum length 20 validation. 4-Now Finally we