Thanks Justin. It’s perfect.

—
Sent from Mailbox

On Thu, Dec 4, 2014 at 8:22 AM, Justin Walsh <[email protected]>
wrote:

> Hi Yehonathan 
> Something like this <http://plnkr.co/edit/16sk7r?p=preview>?
> Regards
> Justin
> On Wednesday, 3 December 2014 13:25:07 UTC+2, Yehonathan Sharvit wrote:
>>
>> 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 a topic in the Google 
> Groups "AngularJS" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/angular/fO99gQryUIo/unsubscribe.
> To unsubscribe from this group and all its topics, 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.

-- 
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.

Reply via email to