diff --git a/system/validator.php b/system/validator.php index 895a22d4..eb4532f0 100644 --- a/system/validator.php +++ b/system/validator.php @@ -29,10 +29,15 @@ class Validator { * @param mixed $target * @return void */ - public function __construct($target = array()) + public function __construct($target = null) { $this->errors = new Validation\Error_Collector; + if (is_null($target)) + { + $target = Input::get(); + } + // --------------------------------------------------------- // If the source is an Eloquent model, use the model's // attributes as the validation attributes. @@ -46,7 +51,7 @@ public function __construct($target = array()) * @param mixed $target * @return Validator */ - public static function make($target = array()) + public static function make($target = null) { return new static($target); }