summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authornisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-02-21 08:39:29 +0100
committernisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-02-21 08:39:29 +0100
commit5e227994581f2325b4d10e90da6dadb113a4cde1 (patch)
tree0e97fd0a12a731d3cb17a15dd36fc6299419051b /system/libraries
parent32c1e626d51517418acbecadde9a83d67517e0a8 (diff)
Fix for issue #2236
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 172e799f6..1ed50844c 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -836,6 +836,21 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
+ * Checks if the rule is present within the validator
+ *
+ * Permits you to check if a rule is present within the validator
+ *
+ * @param string the field name
+ * @return bool
+ */
+ public function has_rule($field)
+ {
+ return isset($this->_field_data[$field]);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Get the value from a form
*
* Permits you to repopulate a form field with the value it was submitted