Answer the question
In order to leave comments, you need to log in
How to add exception for yii2 validator unique?
There is a nice built-in validator in Yii. You can add a rule for checking the uniqueness of mail with this line
['email', 'unique', 'targetClass' => '\common\models\User', 'message' => 'Этот почтовый ящик уже занят.'],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question