Permalink
Browse files

Minor changes, just coding style.

  • Loading branch information...
alganet committed May 6, 2011
1 parent 40aec39 commit 3747665b2bf27a5f6d696dd4c0868fc00457f954
@@ -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',
)
);
@@ -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);
}
}

0 comments on commit 3747665

Please sign in to comment.