From 36fe006b089e4384a28aaf392b8d71a83e140c5c Mon Sep 17 00:00:00 2001 From: Michael Hasselbring Date: Wed, 13 Jul 2011 19:40:55 -0500 Subject: [PATCH] Created Validator::make() --- system/validator.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system/validator.php b/system/validator.php index ff3e1209..d49ebce1 100644 --- a/system/validator.php +++ b/system/validator.php @@ -52,6 +52,19 @@ public function __construct($attributes, $rules, $messages = array()) $this->messages = $messages; } + /** + * Factory for creating new validator instances. + * + * @param array $attributes + * @param array $rules + * @param array $messages + * @return Validator + */ + public static function make($attributes, $rules, $messages = array()) + { + return new static($attributes, $rules, $messages); + } + /** * Validate the target array using the specified validation rules. *