..requires=[IS_EMPTY_OR(IS_EMAIL()), IS_EMPTY_OR(IS_NOT_IN_DB(db,
db.table.email)) ]


On Dec 3, 6:31 pm, Carlos <[email protected]> wrote:
> Hi,
>
> Shouldn't IS_EMPTY_OR accept a list instead of only one alternative
> validator as arg 0?.
>
> For example in the case where an email field can be either empty or
> unique, in which case we would need something like the following:
>
> IS_EMPTY_OR([ IS_EMAIL(), IS_NOT_IN_DB(db, db.table.email) ])
> ('[email protected]')
>
> What do you think?.
>
>    Carlos

Reply via email to