LessThanValidator example

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\LessThan;
use Symfony\Component\Validator\Constraints\LessThanValidator;

/** * @author Daniel Holmes <daniel@danielholmes.org> */
class LessThanValidatorTest extends AbstractComparisonValidatorTestCase
{
    protected function createValidator(): LessThanValidator
    {
        return new LessThanValidator();
    }

    protected static function createConstraint(array $options = null): Constraint
    {
        return new LessThan($options);
    }

    protected function getErrorCode(): ?string
    {
        return LessThan::TOO_HIGH_ERROR;
    }

    
Home | Imprint | This part of the site doesn't use cookies.