以下是我的代码,它适用于密码,但不知何故重新输入密码验证不起作用。让我知道我在这里做错了什么。
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Password" ng-model="vm.user.password" name="password" required="" ng-minlength="6" ng-maxlength="20" />
<div class="help-block" ng-messages="userForm.password.$error" ng-if="userForm.password.$touched">
<p ng-message="minlength, maxlength, required">Please enter a password containing 6 to 20 characters.</p>
</div>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Retype password" name="retypePassword" required="" ng-model="vm.user.retypePassword">
<div class="help-block" ng-messages="userForm.retypePassword.$error" ng-if="userForm.retypePassword.$touched">
<p ng-message when="vm.user.retypePassword !== vm.user.password" >Please retype your correct password.</p>
</div>
在DOCS中,他们提到我们可以使用表达式,但不知何故它没有验证。