+1

On May 30, 1:12 am, Jonathan Lundell <[email protected]> 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 address')
>
> Underscores are not allowed, but we accept them because they've been used 
> historically and there's no compelling reason (in a validator) to reject 
> them. If we were actually allocating domain names, there'd be a reason do so, 
> but we're not.
>
> We should also keep in mind that there's no way we can guarantee that the 
> address that gets typed in is correct (in the sense of not having a typo, 
> even if it's syntactically correct). Mainly, we want to check that it "looks 
> like" an email address, and err on the side of permissiveness.
>
> > **********************************************************************
> > File "gluon/validators.py", line 859, in __main__.IS_EMAIL
> > Failed example:
> >    IS_EMAIL()('local...@localhost')       # localhost as domain
> > Expected:
> >    ('local...@localhost', None)
> > Got:
> >    ('local...@localhost', 'enter a valid email address')
> > **********************************************************************
>
> > On May 29, 9:36 pm, blackthorne <[email protected]> wrote:
> >>http://fightingforalostcause.net/misc/2006/compare-email-regex.php
>
> >> Take it as a suggestion for a better email regex validator...

Reply via email to