The message can be customized by an "error_message" argument.
db.Field('foo', 'integer', requires=IS_INT_IN_RANGE
(0,5,error_message='oops'))
But I havn't tested whether it can be:
..., error_message=T('oops') ...
Maybe you can try and tell us.
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'
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---