mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 02:30:06 +02:00
Minor changes, just coding style.
This commit is contained in:
parent
40aec39c4a
commit
3747665b2b
|
@ -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 is_string($input) && filter_var($input, FILTER_VALIDATE_EMAIL);
|
||||
}
|
||||
|
||||
return (bool) filter_var($input, FILTER_VALIDATE_EMAIL);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue