Answer the question
In order to leave comments, you need to log in
Why is {attribute} not being replaced with the attribute name?
In the model
$this->addError('email', '{attribute} уже занят.');
Answer the question
In order to leave comments, you need to log in
messages of the format '{attribute} already taken.' support built-in validators, but you add error messages through the addError model method, which does not support this message format. Specify the attribute name explicitly, for example:$this->addError('email', 'email уже занят.');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question