8000 [Validator] Remove leading '@' when validating email domain MX record · alexfilatov/symfony@a86bac4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a86bac4

Browse files
Jeremy Mikolafabpot
Jeremy Mikola
authored andcommitted
[Validator] Remove leading '@' when validating email domain MX record
1 parent 74bc9d4 commit a86bac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function isValid($value, Constraint $constraint)
2929
}
3030

3131
if ($constraint->checkMX) {
32-
$host = substr($value, strpos($value, '@'));
32+
$host = substr($value, strpos($value, '@') + 1);
3333

3434
if (!$this->checkMX($host)) {
3535
$this->setMessage($constraint->message, array('value' => $value));

0 commit comments

Comments
 (0)
0