In several places in my application I have to validate that a field is a
valid french phone number.
Like this:
<input type="text"
ng-pattern="/^0[1-6]{1}((([0-9]{2}){4})|((\s[0-9]{2}){4})|((-[0-9]{2}){4}))$/">
* How could I make the regular expression reused by several input fields in
my application without copy/pasting the `regex`?
* How could I localize the `regex`?
See:
http://stackoverflow.com/questions/27270263/in-angularjs-how-to-write-a-reusable-ng-pattern
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.