Answer the question
In order to leave comments, you need to log in
Invalid CUniqueValidator. Where is the mistake?
Rule:
There is an entry in the table with username = Frapsy, but the validator reports an error if you try to register with username = Fraps, Frap, Fra, that is, with similar ones. Where is the mistake? array('username','unique','className'=>'Users'),
Answer the question
In order to leave comments, you need to log in
https://github.com/yiisoft/yii/blob/1.1.14/framewo...
have you looked at the validator code? you can debug it and find the error in 5 minutes
attributeName is not specified, but should be
array('username', 'unique', 'className' => 'Users', 'attributeName' => 'username'),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question