8000 [Validator] Fix Email validator logic · symfony/symfony@ef7906d · GitHub
[go: up one dir, main page]

Skip to content

Commit ef7906d

Browse files
committed
[Validator] Fix Email validator logic
1 parent fe23f0f commit ef7906d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Validator/Constraints/EmailValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Egulias\EmailValidator\Validation\NoRFCWarningsValidation;
1717
use Symfony\Component\Validator\Constraint;
1818
use Symfony\Component\Validator\ConstraintValidator;
19+
use Symfony\Component\Validator\Exception\LogicException;
1920
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
2021
use Symfony\Component\Validator\Exception\UnexpectedValueException;
2122

@@ -71,7 +72,7 @@ public function validate($value, Constraint $constraint)
7172

7273
if (null === $constraint->mode) {
7374
if (Email::VALIDATION_MODE_STRICT === $this->defaultMode && !class_exists(EguliasEmailValidator::class)) {
74-
throw new LogicException(sprintf('The "egulias/email-validator" component is required to make the "%s" constraint default to strict mode.', EguliasEmailValidator::class));
75+
throw new LogicException(sprintf('The "egulias/email-validator" component is required to make the "%s" constraint default to strict mode.', Email::class));
7576
}
7677

7778
$constraint->mode = $this->defaultMode;

0 commit comments

Comments
 (0)
0