On Jun 11, 4:42 pm, Fran <francisb...@googlemail.com> wrote: > On Jun 11, 9:50 pm, DenesL <denes1...@yahoo.ca> 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 web2py@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 -~----------~----~----~----~------~----~------~--~---