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

This commit is contained in:
Jeremy Mikola 2010-09-10 14:27:17 -04:00 committed by Fabien Potencier
parent 74bc9d461b
commit a86bac44ce

View File

@ -29,7 +29,7 @@ class EmailValidator extends ConstraintValidator
}
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));