Added vendor/ directory for Composer's installed files

This commit is contained in:
Ascendings
2015-08-30 12:33:20 -04:00
parent 45df179c49
commit b66a773ed8
1162 changed files with 112457 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace Violin\Rules;
use Violin\Contracts\RuleContract;
class MaxRule implements RuleContract
{
public function run($value, $input, $args)
{
$number = isset($args[1]) && $args[1] === 'number';
if ($number) {
return (float) $value <= (float) $args[0];
}
return mb_strlen($value) <= (int) $args[0];
}
public function error()
{
return '{field} must be a maximum of {$0}.';
}
public function canSkip()
{
return true;
}
}