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