T should not be embedded in validators, however, what about something
similar to auth.settings, and the i18n fr-fr.py, but for the error messages?
ERROR_MESSAGES = {
"IS_NOT_EMPTY": "value cannot be empty",
"IS_IN_DB": "value does not exist in db",
}
This could easily be overridden in a model
ERROR_MESSAGES['IS_NOT_EMPTY'] = T("Yeah, you need to put something here
man...")
also, still keep the ability to assign error_message in the field
declaration, for per-field error messages.
-Thadeus
On Wed, Oct 21, 2009 at 12:13 PM, mdipierro <[email protected]> wrote:
> how to pass T to the validators without a mechanism of hidden
> hooks and I would rather avoid that.
> Perhaps you can propose a specific possible implementation that I have
> not thought of.
>
> We should also consider that IF T had been har
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---