diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Form_validation.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 36a8148df..0251286ea 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -618,6 +618,12 @@ class CI_Form_validation { $rules = array(1 => $rule); break; } + elseif (is_array($rule) && isset($rule[0], $rule[1]) && is_callable($rule[1])) + { + $callback = TRUE; + $rules = array($rule[0] => $rule[1]); + break; + } } if ( ! $callback) |