Thanks DenesL, I'll give that a try.  Thanks for the advice.

On Oct 13, 4:53 am, DenesL <denes1...@yahoo.ca> wrote:
> Hi Joe,
>
> use IS_EMPTY_OR as in
>
> IS_EMPTY_OR(IS_EMAIL(error_message=T('Invalid email address.')))
>
> Denes
>
> On Oct 13, 3:55 am, Joe J <joe.jasin...@gmail.com> wrote:
>
>
>
> > 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