- if (!$strictValidator->isValid($value, false, true)) {
- if ($this->context instanceof ExecutionContextInterface) {
- $this->context->buildViolation($constraint->message)
- ->setParameter('{{ value }}', $this->formatValue($value))
- ->setCode(Email::INVALID_FORMAT_ERROR)
- ->addViolation();
- } else {
- $this->buildViolation($constraint->message)
- ->setParameter('{{ value }}', $this->formatValue($value))
- ->setCode(Email::INVALID_FORMAT_ERROR)
- ->addViolation();
- }
-
- return;
- }
- } elseif (!preg_match('/^.+\@\S+\.\S+$/', $value)) {
- if ($this->context instanceof ExecutionContextInterface) {