I have 3 scenarios in the model in the rules () method, and I want to use the rule in 2 scenarios,
[['username', 'email', 'password'], 'required', 'on' => self::SCENARIO_REGISTER]
I read the manual, did not find a way to bind the rule to two scenarios at the same time? Is there any way to do this?
yii2 model
tyan
source share