DivisibleByValidator example

use Symfony\Component\Validator\Constraints\DivisibleBy;
use Symfony\Component\Validator\Constraints\DivisibleByValidator;
use Symfony\Component\Validator\Exception\UnexpectedValueException;

/** * @author Colin O'Dell <colinodell@gmail.com> */
class DivisibleByValidatorTest extends AbstractComparisonValidatorTestCase
{
    protected function createValidator(): DivisibleByValidator
    {
        return new DivisibleByValidator();
    }

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

    protected function getErrorCode(): ?string
    {
        return DivisibleBy::NOT_DIVISIBLE_BY;
    }

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