@@ -794,8 +794,12 @@ var VALID_CLASS = 'ng-valid',
794
794
* @property {string } $viewValue Actual string value in the view.
795
795
* @property {* } $modelValue The value in the model, that the control is bound to.
796
796
* @property {Array.<Function> } $parsers Array of functions to execute, as a pipeline, whenever
797
- * the control reads value from the DOM. Each function is called, in turn, passing the value
798
- * through to the next. Used to sanitize / convert the value as well as validation.
797
+ the control reads value from the DOM. Each function is called, in turn, passing the value
798
+ through to the next. Used to sanitize / convert the value as well as validation.
799
+
800
+ For validation, the parsers should update the validity state using
801
+ {@link ng.directive:ngModel.NgModelController#$setValidity $setValidity()},
802
+ and return `undefined` for invalid values.
799
803
*
800
804
* @property {Array.<Function> } $formatters Array of functions to execute, as a pipeline, whenever
801
805
* the model value changes. Each function is called, in turn, passing the value through to the
@@ -1005,11 +1009,9 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
1005
1009
* For example {@link ng.directive:input input} or
1006
1010
* {@link ng.directive:select select} directives call it.
1007
1011
*
1008
- * It internally calls all `parsers` (including validators) and updates the `$modelValue` and the actual model path.
1012
+ * It internally calls all `$ parsers` (including validators) and updates the `$modelValue` and the actual model path.
1009
1013
* Lastly it calls all registered change listeners.
1010
1014
*
1011
- * If validators determine the value is invalid, the `$modelValue` and the model path will be set to `undefined`.
1012
- *
1013
1015
* @param {string } value Value from the view.
1014
1016
*/
1015
1017
this . $setViewValue = function ( value ) {
0 commit comments