IdenticalToValidator example

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\IdenticalTo;
use Symfony\Component\Validator\Constraints\IdenticalToValidator;

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

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

    protected function getErrorCode(): ?string
    {
        return IdenticalTo::NOT_IDENTICAL_ERROR;
    }

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