I've few doubts/huddles for my page
1). I've a input control. It should only allow user to enter between 1 to 5. If user tries to enter maximum of 5, error should be thrown. will ng-pattern="/^[1-5]*$/" correct?
<input type="text" ng-model="MovieRating" class="form-control" name="MovRate" ng-pattern="/^[1-5]*$/" required />
<span ng-show="adduserform.MovClafictn.$error.pattern" class="spnmsg">Rating should be 1 to 5</span>
2)Have one more input control which should be entered 4 digits only. Less than that/More of it should trigger validation. (Actually this control for entering year value)
ng-pattern= /19[789]\d|20[01]\d/gfor allowing user to enter only 1979 to 2019