diff options
author | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-02-21 08:39:29 +0100 |
---|---|---|
committer | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-02-21 08:39:29 +0100 |
commit | 5e227994581f2325b4d10e90da6dadb113a4cde1 (patch) | |
tree | 0e97fd0a12a731d3cb17a15dd36fc6299419051b /system/libraries/Form_validation.php | |
parent | 32c1e626d51517418acbecadde9a83d67517e0a8 (diff) |
Fix for issue #2236
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 15 |
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 |