actually my trik is

def has(name): return Field(name,'string',IS_NOT_EMPTY(error_message=T
('oops, fill this!')))

db.define_table('person',has('name'),has('telephone'),...)



On Dec 3, 11:20 am, blackthorne <francisco....@gmail.com> wrote:
> I knew that! :1
> I just couldn't... remember!
>
> Thank you!
>
> On Dec 3, 5:17 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > I am not sure I understand the question. SQLFORM gets the error
> > messages from the validators in the fields. You should pass the error
> > message to the validators
>
> > db.define_table('person',...Field('name'),....)
> > db.person.name.requires=IS_NOT_EMPTY(error_message=T('oops, fill
> > this!'))
>
> > form=SQLFORM(db.person)
>
> > On Dec 3, 11:03 am, blackthorne <francisco....@gmail.com> wrote:
>
> > > I need, for translation reasons, to be able to customize the
> > > validation errors (such as: "cannot be empty!", "invalid email!")
> > > messages in forms generated by SQLFORM().
>
> > > I've been hacking some things but I was looking for a clean and
> > > elegant solution to this small problem.
>
> > > Thank you.
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to