Skip to content

Commit 6f40c88

Browse files
blaise-iopetebacondarwin
authored andcommitted
docs(form): provide a list of Angular's built-in validation tokens
As requested by a top-rated Disqus comment: http://docs.angularjs.org/api/ng.directive:form.FormController#comment-655325797 Closes angular#5121
1 parent 68dd621 commit 6f40c88

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/ng/directive/form.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,22 @@ var nullFormCtrl = {
2121
* @property {Object} $error Is an object hash, containing references to all invalid controls or
2222
* forms, where:
2323
*
24-
* - keys are validation tokens (error names) — such as `required`, `url` or `email`,
25-
* - values are arrays of controls or forms that are invalid with given error.
24+
* - keys are validation tokens (error names),
25+
* - values are arrays of controls or forms that are invalid for given error name.
2626
*
27+
*
28+
* Built-in validation tokens:
29+
*
30+
* - `email`
31+
* - `max`
32+
* - `maxlength`
33+
* - `min`
34+
* - `minlength`
35+
* - `number`
36+
* - `pattern`
37+
* - `required`
38+
* - `url`
39+
*
2740
* @description
2841
* `FormController` keeps track of all its controls and nested forms as well as state of them,
2942
* such as being valid/invalid or dirty/pristine.

0 commit comments

Comments
 (0)