In Angular2, there is a PatternValidator directive. Not sure if there is an equivalent directive for Angular1. Sorry I can't be of more help.
On Tue, Jul 26, 2016 at 12:45 PM, Rajan Singh <[email protected]> wrote: > I have already verified regex on http://regexr.com/ & now verified on > https://regex101.com/ It is a valid regex. > > > On Tuesday, July 26, 2016 at 8:24:59 PM UTC+5:30, Rajan Singh wrote: >> >> Hi, >> >> I have pattern which is /^\w(?:(?![ \\.']{2,})[\w \\.'])*/. It is for >> name which starts with words & allows .(period), (space), '(Single >> Quote) but two consecutive .(period), (space), '(Single Quote) are not >> allowed. >> >> I am using ng-pattern= /^\w(?:(?![ \\.']{2,})[\w \\.'])*/ which is not >> working allowing @! anything. I don't know why it is happening. Please help. >> >> Positive test cases : A.B Shar'ma >> He.llo's >> >> Negative Test Cases: He.llo's@@#! >> ...Raj >> '''MyName@! >> >> If you want build you own test case, Please enter a valid name. Special >> characters other than (Space, Dot and Single Quote) are not allowed. >> >> Currently I am using Angular version 1.5.3; >> > -- > 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 https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Lucas Lacroix Computer Scientist System Technology Division, MEDITECH <http://ehr.meditech.com> 781-774-2293 -- 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 https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
