On Jun 11, 4:42 pm, Fran <[email protected]> wrote:
> On Jun 11, 9:50 pm, DenesL <[email protected]> wrote:
>
> > Fran, what do you mean by:
> > > However they won't work for some custom forms/functions.
>
> If I define in my model:
> db.define_table('test',
>                 db.Field('test', requires=IS_NOT_EMPTY()))
>
> Then do:
> db.test.insert(test='')
>
> It works fine - record is inserted.

That is not a form (or custom form).
It is clear that validators as IS_NOT_EMPTY are not checked by insert.

Defining the field as notnull=True would/should prevent the insert (at
the DB level).


--~--~---------~--~----~------------~-------~--~----~
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