@@ -46,9 +46,13 @@ var inputType = {
46
46
* as in the ngPattern directive.
47
47
* @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
48
48
* a RegExp found by evaluating the Angular expression given in the attribute value.
49
- * If the expression evaluates to a RegExp object then this is used directly.
50
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
51
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
49
+ * If the expression evaluates to a RegExp object, then this is used directly.
50
+ * If the expression evaluates to a string, then it will be converted to a RegExp
51
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
52
+ * `new RegExp('^abc$')`.<br />
53
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
54
+ * start at the index of the last search's match, thus not taking the whole input value into
55
+ * account.
52
56
* @param {string= } ngChange Angular expression to be executed when input changes due to user
53
57
* interaction with the input element.
54
58
* @param {boolean= } [ngTrim=true] If set to false Angular will not automatically trim the input.
@@ -626,9 +630,13 @@ var inputType = {
626
630
* as in the ngPattern directive.
627
631
* @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
628
632
* a RegExp found by evaluating the Angular expression given in the attribute value.
629
- * If the expression evaluates to a RegExp object then this is used directly.
630
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
631
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
633
+ * If the expression evaluates to a RegExp object, then this is used directly.
634
+ * If the expression evaluates to a string, then it will be converted to a RegExp
635
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
636
+ * `new RegExp('^abc$')`.<br />
637
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
638
+ * start at the index of the last search's match, thus not taking the whole input value into
639
+ * account.
632
640
* @param {string= } ngChange Angular expression to be executed when input changes due to user
633
641
* interaction with the input element.
634
642
*
@@ -720,9 +728,13 @@ var inputType = {
720
728
* as in the ngPattern directive.
721
729
* @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
722
730
* a RegExp found by evaluating the Angular expression given in the attribute value.
723
- * If the expression evaluates to a RegExp object then this is used directly.
724
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
725
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
731
+ * If the expression evaluates to a RegExp object, then this is used directly.
732
+ * If the expression evaluates to a string, then it will be converted to a RegExp
733
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
734
+ * `new RegExp('^abc$')`.<br />
735
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
736
+ * start at the index of the last search's match, thus not taking the whole input value into
737
+ * account.
726
738
* @param {string= } ngChange Angular expression to be executed when input changes due to user
727
739
* interaction with the input element.
728
740
*
@@ -815,9 +827,13 @@ var inputType = {
815
827
* as in the ngPattern directive.
816
828
* @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
817
829
* a RegExp found by evaluating the Angular expression given in the attribute value.
818
- * If the expression evaluates to a RegExp object then this is used directly.
819
- * If the expression is a string then it will be converted to a RegExp after wrapping it in `^` and `$`
820
- * characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`.
830
+ * If the expression evaluates to a RegExp object, then this is used directly.
831
+ * If the expression evaluates to a string, then it will be converted to a RegExp
832
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
833
+ * `new RegExp('^abc$')`.<br />
834
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
835
+ * start at the index of the last search's match, thus not taking the whole input value into
836
+ * account.
821
837
* @param {string= } ngChange Angular expression to be executed when input changes due to user
822
838
* interaction with the input element.
823
839
*
@@ -1439,9 +1455,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
1439
1455
* @param {number= } ngMaxlength Sets `maxlength` validation error key if the value is longer than
1440
1456
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
1441
1457
* length.
1442
- * @param {string= } ngPattern Sets `pattern` validation error key if the value does not match the
1443
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
1444
- * patterns defined as scope expressions.
1458
+ * @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
1459
+ * a RegExp found by evaluating the Angular expression given in the attribute value.
1460
+ * If the expression evaluates to a RegExp object, then this is used directly.
1461
+ * If the expression evaluates to a string, then it will be converted to a RegExp
1462
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
1463
+ * `new RegExp('^abc$')`.<br />
1464
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
1465
+ * start at the index of the last search's match, thus not taking the whole input value into
1466
+ * account.
1445
1467
* @param {string= } ngChange Angular expression to be executed when input changes due to user
1446
1468
* interaction with the input element.
1447
1469
* @param {boolean= } [ngTrim=true] If set to false Angular will not automatically trim the input.
@@ -1472,9 +1494,15 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
1472
1494
* @param {number= } ngMaxlength Sets `maxlength` validation error key if the value is longer than
1473
1495
* maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
1474
1496
* length.
1475
- * @param {string= } ngPattern Sets `pattern` validation error key if the value does not match the
1476
- * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
1477
- * patterns defined as scope expressions.
1497
+ * @param {string= } ngPattern Sets `pattern` validation error key if the ngModel value does not match
1498
+ * a RegExp found by evaluating the Angular expression given in the attribute value.
1499
+ * If the expression evaluates to a RegExp object, then this is used directly.
1500
+ * If the expression evaluates to a string, then it will be converted to a RegExp
1501
+ * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
1502
+ * `new RegExp('^abc$')`.<br />
1503
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
1504
+ * start at the index of the last search's match, thus not taking the whole input value into
1505
+ * account.
1478
1506
* @param {string= } ngChange Angular expression to be executed when input changes due to user
1479
1507
* interaction with the input element.
1480
1508
* @param {boolean= } [ngTrim=true] If set to false Angular will not automatically trim the input.
0 commit comments