`onvalidation` is what happens *after  *form validation is passed.
You can add your validators to auth_user.email.requires (they should be 
first on the validators list )
or  you can insert your formatters in user() controller, I mean:
def user():  
    if request.vars.email: 
        request.vars.email = request.vars.email.lower().strip()
    return dict(form=auth())



On Friday, November 23, 2018 at 9:11:15 AM UTC+3, Константин Комков wrote:
>
> I do like that:
> def email_to_lower(form):
>     form.vars.email = form.vars.email.lower()
>     form.vars.email = form.vars.email.strip()
> auth.settings.login_onvalidation = email_to_lower
> But I have message that my email is incorrect, if I enter ' 
> myem...@gmail.com ' 
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to