Why don't the rules for the scenario?


There are model Users. In this two scenarios:
const SCENARIO_EDIT = 'edit';

SCENARIO_EDIT not associated with any rule. For a password attribute is specified, the script SCENARIO_NEW.
If you specify a script SCENARIO_EDIT is no validation at all. What could be the reason? Need that validation passed on all fields, except the password.

p.s. For attributes not specified scenarios.
p.s.s. Scenarios method is not overridden.
July 8th 19 at 15:33
2 answers
July 8th 19 at 15:35
Reread the documentation. I do not understand what could be the reason.. - Akeem_Erdman26 commented on July 8th 19 at 15:38
July 8th 19 at 15:37
In Russian you can read here https://github.com/yiisoft/yii2/blob/master/docs/g...
But in Yii2 when the job scenario is not described in senarios() or validation rules (attributes on or except) throws InvalidParamException exception.
weird. I ask not the described scenario, no exceptions - Akeem_Erdman26 commented on July 8th 19 at 15:40
Then without the code not to understand. - Akeem_Erdman26 commented on July 8th 19 at 15:43

Find more questions by tags Yii