This is probably an easy question, but I'm looking for a way to
validate a field if it is given, but let it pass if it is empty.
Currently, the following validator doesn't allow an empty string to be
passed in.  Is there an argument to the IS_EMAIL validator and other
validators that allow it to accept empty values?

db.define_table('entity',
    Field('email', 'string', length=64, required=False),
)

db.entity.email.requires = IS_EMAIL(error_message=T('Invalid email
address.'))

Reply via email to