[web2py] Re: Email "perfect" regex

2010-05-31 Thread blackthorne
:) On May 31, 5:59 am, mdipierro wrote: > I agree with Jonathan on this one but I would not oppose something > like > > IS_EMAIL(strict=True)? > > Massimo > > On May 30, 9:47 pm, blackthorne wrote: > > > > > My point is... why do you use IS_EMAIL() validator? because you want > > to know if that

[web2py] Re: Email "perfect" regex

2010-05-30 Thread mdipierro
I agree with Jonathan on this one but I would not oppose something like IS_EMAIL(strict=True)? Massimo On May 30, 9:47 pm, blackthorne wrote: > My point is... why do you use IS_EMAIL() validator? because you want > to know if that email address is valid or not. why? probably because > you want

[web2py] Re: Email "perfect" regex

2010-05-30 Thread blackthorne
My point is... why do you use IS_EMAIL() validator? because you want to know if that email address is valid or not. why? probably because you want your app to send the user an email, so to prevent it not to arrive to its destiny it becomes important to make sure, that email address is valid. If the

[web2py] Re: Email "perfect" regex

2010-05-29 Thread mdipierro
+1 On May 30, 1:12 am, Jonathan Lundell wrote: > On May 29, 2010, at 9:39 PM, mdipierro wrote: > > > The one your propose fails two of our tests: > > Failed example: > >    IS_EMAIL()('a...@d_-f.us') > > Expected: > >    ('a...@d_-f.us', None) > > Got: > >    ('a...@d_-f.us', 'enter a valid email

Re: [web2py] Re: Email "perfect" regex

2010-05-29 Thread Jonathan Lundell
On May 29, 2010, at 9:39 PM, mdipierro wrote: > The one your propose fails two of our tests: > Failed example: >IS_EMAIL()('a...@d_-f.us') > Expected: >('a...@d_-f.us', None) > Got: >('a...@d_-f.us', 'enter a valid email address') Underscores are not allowed, but we accept them becaus

[web2py] Re: Email "perfect" regex

2010-05-29 Thread Iceberg
On May30, 10:36am, blackthorne wrote: > http://fightingforalostcause.net/misc/2006/compare-email-regex.php > > Take it as a suggestion for a better email regex validator... +1. The post contains implementations as well as test cases. It should be easy to convert them into a web2py validator WIT

[web2py] Re: Email "perfect" regex

2010-05-29 Thread mdipierro
The one your propose fails two of our tests: Failed example: IS_EMAIL()('a...@d_-f.us') Expected: ('a...@d_-f.us', None) Got: ('a...@d_-f.us', 'enter a valid email address') ** File "gluon/validators.py", line 859, in _