adding validator tests.

This commit is contained in:
Taylor Otwell
2011-10-16 13:34:26 -05:00
parent 8bd6d34622
commit f8e63f313d
2 changed files with 31 additions and 1 deletions

View File

@@ -208,7 +208,7 @@ class Validator {
*/
protected function validate_required($attribute, $value)
{
return (is_null($value) or (is_string($value) and trim($value) === ''));
return ! (is_null($value) or (is_string($value) and trim($value) === ''));
}
/**