From e1c89285509969f6eb720733cdc40f95fdc8b7d8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 Feb 2012 15:19:01 -0600 Subject: [PATCH] added passes and fails method to validtor. --- laravel/validator.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/laravel/validator.php b/laravel/validator.php index 2fe0310f..6e38c055 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -117,6 +117,26 @@ public static function register($name, $validator) static::$validators[$name] = $validator; } + /** + * Validate the target array using the specified validation rules. + * + * @return bool + */ + public function passes() + { + return $this->valid(); + } + + /** + * Validate the target array using the specified validation rules. + * + * @return bool + */ + public function fails() + { + return $this->invalid(); + } + /** * Validate the target array using the specified validation rules. *