Custom validation in yii2 -


i have custom validation in model

        [['abc1','abc2','abc3','abc4', 'skiponempty' => false,], 'required', 'when' => function ($model) {             if ($model->xyz == 1){                 return true;             }else{                 return false;             }         },             'skiponempty' => false,         ], 

where $model->xyz dropdownlist. validation working fine due validation forms not working well, specially use session. please tell me other way kind of validations


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -