I am writing an app with AngularJS 1.5. I am trying to write a feature where the user can verify their password in the app and I am using ng-messages to try to validate the form.
My from has 2 fields: password and confirm password. The 2 validation conditions are: both passwords are required and the passwords must match.
The problem I have is the pattern match fails for a few special characters. It fails for the dollar sign but not all special characters. I need it to work for all characters.
Here is my JSFiddle: http://jsfiddle.net/aubz88/gm0obnqf/69/
A code snippet:
<div>
<label
class="item"
ng-class="{ 'has-error' : vm.verifyPassword.password.$invalid && (vm.verifyPassword.$submitted || vm.verifyPassword.$dirty) }">
<span class="input-label">Password</span>
<input
id="password"
type="password"
name="password"
ng-model="vm.data.password"
placeholder="password"
required>
</label>
</div>