NotEqualToValidator example

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\NotEqualTo;
use Symfony\Component\Validator\Constraints\NotEqualToValidator;

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

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

    protected function getErrorCode(): ?string
    {
        return NotEqualTo::IS_EQUAL_ERROR;
    }

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