Answer the question
In order to leave comments, you need to log in
Yii2 How to set different validation rules for multiple input of one attribute?
Let's say there are two inputs for one model attribute:
$form->field($model, 'price[]')->textInput(['id'=>'price1'])
$form->field($model, 'price []')->textInput(['id'=>'price2'])
I need to configure the validation so that the first input is required for input, and the second is not.
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