you can write a custom validator here is an example of your array validator
// custom rule
['category_ids', 'validateArray'],
// and your custom validator
public function validateArray($attribute, $params, $validator)
{
if (!is_array($this->$attribute)) {
$this->addError($attribute, 'The attribute must be array.');
}
}