8000 bug #48986 [Validator] Fix Email validator logic (fabpot) · symfony/symfony@9e65ee1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e65ee1

Browse files
committed
bug #48986 [Validator] Fix Email validator logic (fabpot)
This PR was merged into the 5.4 branch. Discussion ---------- [Validator] Fix Email validator logic | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #48985 | License | MIT | Doc PR | n/a Commits ------- ef7906d [Validator] Fix Email validator logic
2 parents fe23f0f + ef7906d commit 9e65ee1

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