respect-validation/library/Respect/Validation/Exceptions/MaxException.php

19 lines
426 B
PHP
Raw Normal View History

<?php
namespace Respect\Validation\Exceptions;
class MaxException extends ValidationException
{
2011-02-07 02:12:41 +01:00
const INCLUSIVE =1;
public static $defaultTemplates = array(
2011-02-07 02:12:41 +01:00
self::STANDARD => '%s is greater than %s',
self::INCLUSIVE => '%s is greater than %s (inclusive)',
);
public function chooseTemplate($input, $inclusive)
{
2011-02-07 02:12:41 +01:00
return $inclusive ? static::INCLUSIVE : static::STANDARD;
}
}