Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to check another rule if one returned false?
There is a rule:
public function rules()
{
return [
[['user_id', 'word'], 'unique', 'targetAttribute' => ['user_id', 'word'], 'message' => 'У вас уже есть такая запись'],
];
}
[['user_id', 'word','field'], 'unique', 'targetAttribute' => ['user_id', 'word','field'], '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