Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 05ec6cc

Browse files
ephigabaytbosch
authored andcommitted
docs(ngModelController): update setValidity
Needs to be `$error[validationErrorKey]!=isValid` and not `$error[validationErrorKey]=isValid`. See https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L1627 Closes #7934
1 parent 0885446 commit 05ec6cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/directive/input.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
15981598
* `ngModel.$validators` pipeline which is designed to handle validations with true/false values.
15991599
*
16001600
* @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign
1601-
* to `$error[validationErrorKey]=isValid` so that it is available for data-binding.
1601+
* to `$error[validationErrorKey]=!isValid` so that it is available for data-binding.
16021602
* The `validationErrorKey` should be in camelCase and will get converted into dash-case
16031603
* for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
16041604
* class and can be bound to as `{{someForm.someControl.$error.myError}}` .

0 commit comments

Comments
 (0)