<div class="controls"> <div class="col-lg-9"> <input class="form-control" ng-model="newPassword" name="newPassword" placeholder="@Labels.newPassword" type="password" autocomplete="off" required ng-pattern="validPassword" /> <!--/^\d*$/ This worked but not "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$" or "^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"--> <!--I had to create validPassword ng scope function to make it work. Worked testing with http://www.regular-expressions.info/javascriptexample.html --> <div class="field-validation-error"> <span ng-show="resetPasswordForm.newPassword.$error.pattern && resetPasswordForm.newPassword.$dirty">@Messages.passwordValidation</span> <span ng-show="resetPasswordForm.newPassword.$error.required && resetPasswordForm.newPassword.$dirty">@String.Format(Messages.isRequired, Labels.newPassword)</span> </div> </div> </div>The password fields have red border when I just open the form (and did nothing yet). And when immediately as I start typing I get the pattern validation error.