我想在我的两个表中检查手机号码的唯一性..我已经添加了这个代码,但它只检查第二个......有没有其他方法可以在表单中验证这个..
$this->addElement('text', 'mobilenumber', array(`enter code here`
'filters' => array('StringTrim'),
'validators' => array`enter code here`(
array('Db_NoRecordExists', true, array('table' => 'beroe_user', 'field' => 'mobilenumber', 'messages' => array(
'recordFound' => 'mobilenumber already exists'
))),
array('Db_NoRecordExists', true, array('table' => 'beroe_user', 'field' => 'mobilenumber', 'messages' => array(
'recordFound' => 'admin already exists'
))),
),
// 'required' => true,
'label' => 'Phone ',
'maxlength' => '15'
));