Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Validator] Remove leading '@' when validating email domain MX record

  • Loading branch information...
commit a86bac44ce29abd30bb5965fb2aac43a4918e9a9 1 parent 74bc9d4
Jeremy Mikola authored fabpot committed
View
2  src/Symfony/Component/Validator/Constraints/EmailValidator.php
@@ -29,7 +29,7 @@ public function isValid($value, Constraint $constraint)
}
if ($constraint->checkMX) {
- $host = substr($value, strpos($value, '@'));
+ $host = substr($value, strpos($value, '@') + 1);
if (!$this->checkMX($host)) {
$this->setMessage($constraint->message, array('value' => $value));
Please sign in to comment.
Something went wrong with that request. Please try again.