Looks like a bug. From the docstring:
...
>>> IS_EMAIL()('@NotAnEmail') # missing name
('@NotAnEmail', 'invalid email!')
...
I think the 6th (or 7th depending on how you count) line of the regex
should be ")+", not ")*". That fixed the bug in my limited testing.
On Sep 27, 5:50 pm, Russell <[email protected]> wrote:
> Hi,
>
> It seems that email addresses without a user portion (eg,
> '[email protected]') will pass IS_EMAIL() validation. Is this the
> intended behavior? See the tests below.
>
> web2py Shell Version 1.67.1 (2009-09-17 13:33:20)
> In[0]: IS_EMAIL()('whatever.com')
> Out[0]: ('whatever.com', 'invalid email!')
> In[1]: IS_EMAIL()('[email protected]')
> Out[1]: ('[email protected]', None)
>
> Thanks
> Russell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---