...requires=IS_EMPTY_OR(IS_EMAIL(...)) See http://web2py.com/book/default/chapter/07#Validators
On Mar 10, 1:21 pm, Eduardo <[email protected]> wrote: > Hello, > > I need to validate a field as e-mail but I also would like to accept > it if it is left empty; the following: > > db.table.field.requires = IS_EMAIL(error_message=T('Not a valid e-mail > address!')) > > flashes the error message for invalid e-mail when the field is left > empty. > > How can I fix that? > > Thanks, > > Eduardo

