> I've noticed I can automatically change the error message of invalid email
> with *auth.messages.invalid_email*. This however works only for*
> auth.login()* but NOT for auth.register().
>
Works for me. Please show your code (always a good idea). Make sure you set
the message before calling auth.define_tables.
> Also, is it possible to change the error message for the *too short*
> message in the password field of the registration form? I do not find this
> value in the auth.messages.
>
We should probably add that (feel free to post an issue on Google Code).
For now, after auth.define_tables:
db.auth_user.password.requires = [CRYPT(key=auth.settings.hmac_key,
min_length=auth.settings.
password_min_length,
error_message='Your custom message'
)]
Another option is to insert the IS_STRONG validator, which gives you more
control. It also has built-in error messages that vary depending on which
requirement(s) weren't met.
db.auth_user.password.requires.insert(0, IS_STRONG())
Anthony
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.