Zend Db_NoRecordExists docs seem to be limited to checking only one column. Is there a way to check multiple keys while checking a record? For example, I authorize the use of the same email address for different cities.
here is my current validator:
$email->setValidators(array(array('emailAddress'),
array('Db_NoRecordExists',false,
array(
'table'=>'usercities',
'field'=>'email',
))));
Tableusercities has two columns: email varchar (64) city_id tinyint
I want to be able to check the combination of these columns. Is it possible? I assume that I will have to create a custom validator. Can this be done without resorting to a custom class?
thanks!
Oji
source
share