Thanks Anthony, When I submit with blank data, no error msg displayed. I expected error msg displayed because I set this field mandatory as below
db.define_table('person', Field('personname', 'string', requires = IS_NOT_EMPTY())) I found that : if form.process().accepted: always return false, so redirect command never reached. The elseif : response.flash = "input info" always run, so page and flash "input info" are displayed again Regards, Tuan. On Friday, April 5, 2013 8:22:50 PM UTC+7, Anthony wrote: > > redirect('default', 'list') > > > Should be: > > redirect(URL('default', 'list')) > > When I submit form with empty value (person name), validation does not >> work. >> > > What do you mean it doesn't work? Do you not see the error message on the > form? What do you expect, and what happens instead? It works when I try the > code? > > Anthony > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.