summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-07-16 03:37:31 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-07-16 03:37:31 +0200
commit1b1b67693060ecb6dd399ea6aee4a5503d96adda (patch)
tree1f3832cb7c748d700a04d0be94416d60b566c57d /system
parent8a02247acbac87b3b947d9188ec4f5805f2e1a52 (diff)
enable use of param in a callback rule, on behalf of marcoscoelho.
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Form_validation.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index d370d75ee..fd95d76fa 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]));