The issue is that different validators are required for different
actions:

# in retrieve_password
auth.table_user.email.requires has list with "IS_IN_DB" validator

# in register
auth.table_user.email.requires has list with "IS_NOT_IN_DB" validator


On May 4, 5:27 pm, mdipierro <[email protected]> wrote:
> Not sure I understand the issue.
>
> You can override tools validators in your models.
>
> auth=Auth(....)
> auth.define_table()
> auth.table_user.fiest_name.requires=IS_NOT_EMPTY(error_message=T('fill
> it up!'))
>
> On May 4, 9:14 am, Vidul Petrov <[email protected]> wrote:
>
>
>
> > Thank you, guruyaya.
>
> > The problem is that these validators are called in tools.py and it
> > does not allow T object usage.
>
> > On May 4, 4:49 pm, guruyaya <[email protected]> wrote:
>
> > > Sure. You can just go like this
> > > requires=IS_EMAIL(error_message=T("Must be a vaild email"))
> > > You need to do this to every validator you have.
> > > (I didn't write the full syntax, but I'm quite sure you understand it.
> > > Oh, and I'm not home, so it's not really tested, but I recall this is
> > > the syntax).
>
> > > On May 4, 4:28 pm, Vidul Petrov <[email protected]> wrote:
>
> > > > Is translation of error_message attribute in validators.py possible?
>
> > > > The reason for this is that not all "error_message"s (imho) can be
> > > > customized, for example in methods like retrieve_password and login.
>
> > > > Thank you for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to