summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcos Coelho <marcos@marcoscoelho.com>2011-07-05 21:59:41 +0200
committerMarcosCoelho <marcos@marcoscoelho.com>2011-07-16 06:54:12 +0200
commitc28b2855e572f744f66aebe1d6a09b1b2d25e8ad (patch)
treeab01ac5f7a5fe37c28d5046582de66cfd486ef5e
parent8a02247acbac87b3b947d9188ec4f5805f2e1a52 (diff)
enable use of param in a callback rule; it's a sugestion of solution, another way can be used, this feature seems forgotten;
-rw-r--r--system/libraries/Form_validation.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index d370d75ee..a34809e05 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -488,7 +488,7 @@ class CI_Form_validation {
if ( ! in_array('required', $rules) AND is_null($postdata))
{
// Before we bail out, does the rule contain a callback?
- if (preg_match("/(callback_\w+)/", implode(' ', $rules), $match))
+ if (preg_match("/(callback_\w+(\[.*?\])?)/", implode(' ', $rules), $match))
{
$callback = TRUE;
$rules = (array('1' => $match[1]));
@@ -1378,4 +1378,4 @@ class CI_Form_validation {
// END Form Validation Class
/* End of file Form_validation.php */
-/* Location: ./system/libraries/Form_validation.php */ \ No newline at end of file
+/* Location: ./system/libraries/Form_validation.php */