I am working on a simple user registration form in my Angular1x app. I want to ensure that 'password' and 'password_confirm match. If they do not match the form should be invalid. I can display validation messages if the input does not match but the form is not invalid menaing that it can be submitted:
<div class="form-group input text required " ng-class="{'has-error': userRegister.$submitted && password !== password_confirm}">
<input class="form-control" type="text" name="password_confirm" placeholder="Password Confirm" ng-model="password_confirm" equals="{{password}}" required="required" id="password-confirm" />
</div>
I tried adding the 'equals' attribute which I read aboiut, but again it does not invalid the form.
Any ideas?
equals="{{passwor}}d"just a tippo?