From 4e552b76a63945654af398c19339a0707eab56e3 Mon Sep 17 00:00:00 2001 From: Yonatan Kra Date: Wed, 30 Aug 2017 13:31:38 +0300 Subject: [PATCH] docs(guide/expression): add calrification for RegExp in ngPattern `ngPattern` accepts only valid regExp pattern, hence it should be excepted from the `No RegExp Creation With Literal Notation` rule. --- docs/content/guide/expression.ngdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/guide/expression.ngdoc b/docs/content/guide/expression.ngdoc index 842efe31754d..1ec5d376755e 100644 --- a/docs/content/guide/expression.ngdoc +++ b/docs/content/guide/expression.ngdoc @@ -37,7 +37,8 @@ AngularJS expressions are like JavaScript expressions with the following differe even inside `ng-init` directive. * **No RegExp Creation With Literal Notation:** You cannot create regular expressions - in an AngularJS expression. + in an AngularJS expression. An exception to this rule is {@link ngPattern `ng-pattern`} which accepts valid + RegExp. * **No Object Creation With New Operator:** You cannot use `new` operator in an AngularJS expression.