Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Why doesn't the integer validation rule work?
There is a Siganl model that has organization and color
attributes
The model has validation rules
[['organization', 'color'], 'required'],
[['organization', 'color'], 'integer'],
[['organization', 'color'], 'filter', 'filter' => 'intval'],
$model->load(Yii::$app->request->post())
var_dump($model->getDirtyAttributes());
Answer the question
In order to leave comments, you need to log in
load
only loads data into the model, and for validation, you need to run the methodvalidate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question