From d0b160c32986b470dfbfe9a70ce9e9295e105912 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 21 Jul 2011 11:03:44 -0700 Subject: [PATCH] Fix bug causing non-required fields to throw errors in Validator class. --- system/validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/validator.php b/system/validator.php index ef801a8f..159de8f2 100644 --- a/system/validator.php +++ b/system/validator.php @@ -118,7 +118,7 @@ protected function check($attribute, $rule) // No validation will be run for attributes that do not exist unless the rule being validated // is "required" or "accepted". No other rules have implicit "required" checks. - if ( ! array_key_exists($attribute, $this->attributes) and ! in_array($rule, array('required', 'accepted'))) + if ( ! static::validate_required($attribute) and ! in_array($rule, array('required', 'accepted'))) { return; }