isUnique valitadion not working cakephp 2x

Asked

Viewed 20 times

1

In my template, I created a valitaion for my email field, where if you have another email it shows that it is not possible to register, but this validation is not working.

 public $validate = array(
    'nome' => array(
        'notempty' => array(
            'rule' => array('notempty'),
            'message' => 'Por favor, digite seu nome'
        ),
    ),
    'email' => array(
        'mail' => array(
            'rule' => array('email', true),
            'required' => false,
            'message' => 'Not correct e-mail!'),
        'isUnique' => array(
            'rule' => 'isUnique',
            'message' => 'E-mail was registered!')),         
);
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.