@@ -15,13 +15,13 @@ var nullFormCtrl = {
15
15
*
16
16
* @property {boolean } $pristine True if user has not interacted with the form yet.
17
17
* @property {boolean } $dirty True if user has already interacted with the form.
18
- * @property {boolean } $valid True if all of the containg forms and controls are valid.
18
+ * @property {boolean } $valid True if all of the containing forms and controls are valid.
19
19
* @property {boolean } $invalid True if at least one containing control or form is invalid.
20
20
*
21
21
* @property {Object } $error Is an object hash, containing references to all invalid controls or
22
22
* forms, where:
23
23
*
24
- * - keys are validation tokens (error names) — such as `REQUIRED `, `URL ` or `EMAIL `),
24
+ * - keys are validation tokens (error names) — such as `required `, `url ` or `email `),
25
25
* - values are arrays of controls or forms that are invalid with given error.
26
26
*
27
27
* @description
@@ -162,7 +162,7 @@ function FormController(element, attrs) {
162
162
* does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
163
163
* sub-group of controls needs to be determined.
164
164
*
165
- * @param {string= } ngForm| name Name of the form. If specified, the form controller will be published into
165
+ * @param {string= } name|ngForm Name of the form. If specified, the form controller will be published into
166
166
* related scope, under this name.
167
167
*
168
168
*/
@@ -235,12 +235,12 @@ function FormController(element, attrs) {
235
235
</script>
236
236
<form name="myForm" ng-controller="Ctrl">
237
237
userType: <input name="input" ng-model="userType" required>
238
- <span class="error" ng-show="myForm.input.$error.REQUIRED ">Required!</span><br>
238
+ <span class="error" ng-show="myForm.input.$error.required ">Required!</span><br>
239
239
<tt>userType = {{userType}}</tt><br>
240
240
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>
241
241
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>
242
242
<tt>myForm.$valid = {{myForm.$valid}}</tt><br>
243
- <tt>myForm.$error.REQUIRED = {{!!myForm.$error.REQUIRED }}</tt><br>
243
+ <tt>myForm.$error.required = {{!!myForm.$error.required }}</tt><br>
244
244
</form>
245
245
</doc:source>
246
246
<doc:scenario>
0 commit comments