@@ -817,6 +817,10 @@ var VALID_CLASS = 'ng-valid',
817
817
* @property {Array.<Function> } $parsers Array of functions to execute, as a pipeline, whenever
818
818
the control reads value from the DOM. Each function is called, in turn, passing the value
819
819
through to the next. Used to sanitize / convert the value as well as validation.
820
+ For validation, the parsers should update the validity state using
821
+ {@link ng.directive:ngModel.NgModelController#$setValidity $setValidity()},
822
+ and return `undefined` for invalid values.
823
+
820
824
*
821
825
* @property {Array.<Function> } $formatters Array of functions to execute, as a pipeline, whenever
822
826
the model value changes. Each function is called, in turn, passing the value through to the
@@ -1042,11 +1046,9 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
1042
1046
* For example {@link ng.directive:input input} or
1043
1047
* {@link ng.directive:select select} directives call it.
1044
1048
*
1045
- * It internally calls all `parsers` (including validators) and updates the `$modelValue` and the actual model path.
1049
+ * It internally calls all `$ parsers` (including validators) and updates the `$modelValue` and the actual model path.
1046
1050
* Lastly it calls all registered change listeners.
1047
1051
*
1048
- * If validators determine the value is invalid, the `$modelValue` and the model path will be set to `undefined`.
1049
- *
1050
1052
* @param {string } value Value from the view.
1051
1053
*/
1052
1054
this . $setViewValue = function ( value ) {
0 commit comments