Where do you set the IS_NOT_EMPTY() validator? Do you redefine you
validator for this field in you controller?? Something like this
# model
Field('youfield', 'type', requires=IS_NOT_EMPTY(error_message='Enter your
last name'))
# If you do that in the controller
db.yourtable.yourfield.requires=IS_NOT_EMPTY()
You will have default systeme error message. So in case of appadmin you
will have the one in the model, but not in you SQLFORM...
Watch your code that...
Richard
On Fri, Sep 6, 2013 at 11:35 AM, Annet <[email protected]> wrote:
> In my table definitions I have validators like this one:
>
> IS_NOT_EMPTY(error_message='Enter your last name')
>
> In appadmin: http://127.0.0.1:8000/dbModel/appadmin/insert/db/register#
>
> when I leave the field last_name empty and submit the form the
> error_message
> is being displayed, however, in the following form:
>
>
> form=SQLFORM(db.register,labels=dict(agreedTaC='',agreedDirectDebit=''),separator='',formstyle='bootstrap')
>
> the error_message does not display, instead I get the default 'enter a
> value' message.
>
> I am using web2py 2.5.1.
>
>
> Kind regards,
>
> Annet
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.