Skip to content

Commit 89e61ee

Browse files
committed
chore(docs): not-match
1 parent df17c02 commit 89e61ee

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@ Confirm: <input ng-model="user.passwordConfirm" type="password" match="user.pass
4747
Password: <input ng-model="user.password" type="password" />
4848
Confirm: <input ng-model="user.passwordConfirm" type="password" match="user.password" match-caseless="true" />
4949
```
50-
<small>`match-caseless` can accept a scoped variable to allow the matching to be toggle-able between case insensitive and case sensitive.</small>
50+
<small>`match-caseless` can accept a scoped variable to allow the matching to be toggle-able between case insensitive and case sensitive. Default: false</small>
51+
52+
**Not Match Example**
53+
Sometimes you want to ensure the values do *not* match, in that case you can use the `not-match` flag.
54+
This also works in combination with `match-caseless` (if you want to not match case insensitively).
55+
```html
56+
Password: <input ng-model="user.password" type="password" />
57+
Confirm: <input ng-model="user.passwordConfirm" type="password" match="user.password" not-match="true" />
58+
```
59+
<small>`not-match` can accept a scoped variable (`true`/`false`) to be toggle-able between matching and not matching. Default: false</small>
5160

5261
**Display Custom Error**<br>
5362
If your form and field both are named, you can access the validation result to show/hide messages.

0 commit comments

Comments
 (0)