Minor changes, just coding style.

This commit is contained in:
Alexandre Gaigalas 2011-05-06 13:00:50 -03:00
parent 40aec39c4a
commit 3747665b2b
2 changed files with 3 additions and 6 deletions

View file

@ -10,7 +10,7 @@ class EmailException extends ValidationException
self::STANDARD => '{{name}} must be valid email',
),
self::MODE_NEGATIVE => array(
self::STANDARD => '{{name}} must not be email',
self::STANDARD => '{{name}} must not be an email',
)
);

View file

@ -7,10 +7,7 @@ class Email extends AbstractRule
public function validate($input)
{
if (!is_string($input)) {
return false;
}
return (bool) filter_var($input, FILTER_VALIDATE_EMAIL);
return is_string($input) && filter_var($input, FILTER_VALIDATE_EMAIL);
}
}