On Sunday 17 May 2009 20:36:03 Iceberg wrote:
> The message can be customized by an "error_message" argument.
> db.Field('foo', 'integer', requires=IS_INT_IN_RANGE
> (0,5,error_message='oops'))
I know that. But that's well,... a bit too large for me. I prefer dedicating
just a single line for a single db field. And together with all other
arguments and a comment it already close to 80% of screen width.
At the same time I don't really see any harm doing it the way I proposed.
> But I havn't tested whether it can be:
> ..., error_message=T('oops') ...
>
> Maybe you can try and tell us.
May be. But my point (1) was just a freeload. I'm not actually going to make a
translateable app yet, sorry.
> On May17, 3:38pm, Alexey Nezhdanov <[email protected]> wrote:
> > Hello again.
> >
> > When I do
> > form=SQLFORM(db.table)
> > form.accepts(request.post_vars)
> >
> > it displays 'too small or too large' for the 'integer' and 'double'
> > required fields.
> > There are two problems with it:
> > 1) these strings are not translateable by default
> > 2) It is not exactly the proper message to display. Since that is a
> > required field the more appropriate message would be 'This is a
> > required field'
>
>
--
Sincerely yours
Alexey Nezhdanov
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---