maybe you have clean your cache browser --- En date de : Dim 7.10.12, stoupa91devel [via Struts] <ml-node+s1045723n5710747...@n5.nabble.com> a écrit :
De: stoupa91devel [via Struts] <ml-node+s1045723n5710747...@n5.nabble.com> Objet: Re: Email validation regex - client vs. server À: "stanilas" <stani...@yahoo.fr> Date: Dimanche 7 octobre 2012, 13h20 On 10/07/2012 02:27 AM, Lukasz Lenart wrote: > 2012/10/6 <[hidden email]>: >> Hi all, >> >> I'm using @EmailValidator annotation to check an email address. >> The Struts2 documentation http://struts.apache.org/2.x/docs/email-validator. >> html(http://struts.apache.org/2.x/docs/email-validator.html) mentions that >> following regular expression is being used to check the email address: >> >> \\b(^[_A-Za-z0-9-]<ins>(\\.[_A-Za-z0-9-]</ins>)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b >> >> I'm just wondering why following regular expression is actually being >> generated for the client side validation instead of the first one? (This is >> what I see in the generated HTML page) >> /\b(^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\.[A-Za-z0-9-]+)*((\. >> [A-Za-z0-9]{2,})|(\.[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}))$)\b/gi >> >> The reason why I ask this question is that the client side validation (using >> the second reg ex) considers for example this address [hidden email] >> (mailto:[hidden email]) as a valid email address. >> Do I miss something or is it a bug? >> >> Martin > I think the docs are wrong, in code I see > > \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b > > So please register an issue > > > Kind regards Ok, issue registered https://issues.apache.org/jira/browse/WW-3885 Martin If you reply to this email, your message will be added to the discussion below: http://struts.1045723.n5.nabble.com/Email-validation-regex-client-vs-server-tp5710741p5710747.html To start a new topic under Struts - User, email ml-node+s1045723n3426046...@n5.nabble.com To unsubscribe from Struts - User, click here. NAML -- View this message in context: http://struts.1045723.n5.nabble.com/Email-validation-regex-client-vs-server-tp5710741p5710748.html Sent from the Struts - User mailing list archive at Nabble.com.