diff options
author | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-03-21 11:18:10 +0100 |
---|---|---|
committer | nisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in> | 2013-03-21 11:18:10 +0100 |
commit | a7447d205296eeead94617f4b66707e336547b51 (patch) | |
tree | ef73cd6e834cc732bf706aad2b8a6a60988983f5 /system/libraries/Form_validation.php | |
parent | 76f42d9dcd42bf90c407f151d04ef207c8deebdf (diff) |
Added array notation for keys in Input library
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 |