website/vendor/alexgarrett/violin/src/Rules/ArrayRule.php

24 lines
353 B
PHP
Raw Normal View History

<?php
namespace Violin\Rules;
use Violin\Contracts\RuleContract;
class ArrayRule implements RuleContract
{
public function run($value, $input, $args)
{
return is_array($value);
}
public function error()
{
return '{field} must be an array.';
}
public function canSkip()
{
return true;
}
}