Here IS_NOT_EMAIL() validator :

class IS_NOT_EMAIL:
    def __init__(self, error_message='You can\'t use email as username'):
        self.e = error_message
    def __call__(self, value):
        if not IS_EMAIL()(value)[1]:
            return (value, self.e)
        return (value, None)

Enjoy

Here the recipe : 

http://www.web2pyslices.com/slice/show/1686/is-not-email-validator

Richard

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to