protected function validate(Validator $v) { $v->whenSet(function (Validator $v) { $v->notArray('The value needs to be an array'); }); return parent::validate($v); }
protected function validate(Validator $v) { $v->whenNotNull(function (Validator $v) { $v->notArray('The value needs to be an array'); }); }