Browse files

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

  • Loading branch information...
1 parent 74bc9d4 commit a86bac44ce29abd30bb5965fb2aac43a4918e9a9 Jeremy Mikola committed with fabpot Sep 10, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Symfony/Component/Validator/Constraints/EmailValidator.php
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));

0 comments on commit a86bac4

Please sign in to comment.