summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-03-26 14:44:12 +0100
committerAndrey Andreev <narf@bofh.bg>2013-03-26 14:44:12 +0100
commit5269c1cf2d5ae749309b06194f0a2a737a9ff114 (patch)
treef4155535f7293524b4cdc2c03e4f10369b9263e7 /system/libraries/Form_validation.php
parentee34b84be6697bd4da411edaf625ed97a9480def (diff)
parent408cbb4f3582ac64bb534a6539370992071d5950 (diff)
Merge pull request #2348 from nisheeth-barthwal/feature/nested_keys
Added Parsing Capabilities to Input class for nested array keys
Diffstat (limited to 'system/libraries/Form_validation.php')
-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