summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Validation.php7
1 files changed, 6 insertions, 1 deletions
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
{