From 89a8b9700cd8b27da1f27a18ab5f9d4c5ca2cef4 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 18 Sep 2006 15:46:28 +0000 Subject: --- system/libraries/Validation.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system/libraries/Validation.php') diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php index e4fd36698..227cf9f9a 100644 --- a/system/libraries/Validation.php +++ b/system/libraries/Validation.php @@ -240,7 +240,6 @@ class CI_Validation { // Cycle through the rules! foreach ($ex As $rule) { - // Is the rule a callback? $callback = FALSE; if (substr($rule, 0, 9) == 'callback_') @@ -267,6 +266,12 @@ class CI_Validation { } $result = $this->obj->$rule($_POST[$field], $param); + + // If the field isn't requires we'll move on... + if ( ! in_array('required', $ex)) + { + continue; + } } else { -- cgit v1.2.3-24-g4f1b