Skip to content

Commit 0bc2754

Browse files
committed
docs(input): note that pattern validates the $viewValue
Closes angular#13376
1 parent 0b5ecc6 commit 0bc2754

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/ng/directive/input.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ var inputType = {
4545
* @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
4646
* that contains the regular expression body that will be converted to a regular expression
4747
* as in the ngPattern directive.
48-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
49-
* a RegExp found by evaluating the Angular expression given in the attribute value.
48+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
49+
* does not match a RegExp found by evaluating the Angular expression given in the attribute value.
5050
* If the expression evaluates to a RegExp object, then this is used directly.
5151
* If the expression evaluates to a string, then it will be converted to a RegExp
5252
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
@@ -680,8 +680,8 @@ var inputType = {
680680
* @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
681681
* that contains the regular expression body that will be converted to a regular expression
682682
* as in the ngPattern directive.
683-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
684-
* a RegExp found by evaluating the Angular expression given in the attribute value.
683+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
684+
* does not match a RegExp found by evaluating the Angular expression given in the attribute value.
685685
* If the expression evaluates to a RegExp object, then this is used directly.
686686
* If the expression evaluates to a string, then it will be converted to a RegExp
687687
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
@@ -778,8 +778,8 @@ var inputType = {
778778
* @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
779779
* that contains the regular expression body that will be converted to a regular expression
780780
* as in the ngPattern directive.
781-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
782-
* a RegExp found by evaluating the Angular expression given in the attribute value.
781+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
782+
* does not match a RegExp found by evaluating the Angular expression given in the attribute value.
783783
* If the expression evaluates to a RegExp object, then this is used directly.
784784
* If the expression evaluates to a string, then it will be converted to a RegExp
785785
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
@@ -877,8 +877,8 @@ var inputType = {
877877
* @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
878878
* that contains the regular expression body that will be converted to a regular expression
879879
* as in the ngPattern directive.
880-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
881-
* a RegExp found by evaluating the Angular expression given in the attribute value.
880+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
881+
* does not match a RegExp found by evaluating the Angular expression given in the attribute value.
882882
* If the expression evaluates to a RegExp object, then this is used directly.
883883
* If the expression evaluates to a string, then it will be converted to a RegExp
884884
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
@@ -1510,8 +1510,8 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
15101510
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
15111511
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
15121512
* length.
1513-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
1514-
* a RegExp found by evaluating the Angular expression given in the attribute value.
1513+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
1514+
* does not match a RegExp found by evaluating the Angular expression given in the attribute value.
15151515
* If the expression evaluates to a RegExp object, then this is used directly.
15161516
* If the expression evaluates to a string, then it will be converted to a RegExp
15171517
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
@@ -1549,8 +1549,8 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
15491549
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
15501550
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
15511551
* length.
1552-
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
1553-
* a RegExp found by evaluating the Angular expression given in the attribute value.
1552+
* @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue}
1553+
* value does not match a RegExp found by evaluating the Angular expression given in the attribute value.
15541554
* If the expression evaluates to a RegExp object, then this is used directly.
15551555
* If the expression evaluates to a string, then it will be converted to a RegExp
15561556
* after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to

0 commit comments

Comments
 (0)