I'm trying validate a multiple dropdownlist, like this:
view/form:
<?=
$form->field($hours, 'hours_id', ['template' => '{label}{input}<span class="help-block">{hint}{error}</span>'])->dropDownList(Hours::getHierarchy(), ['size' => 10, 'multiple' => 'multiple'], ['prompt' => Yii::t('app', '-- Select --'),
])
?>
model rules:
['hours_id', 'each', 'rule' => ['integer']],
Result:
Hour is invalid.
Someone knows what's wrong? I tried to custom validation, and i get the same error.