summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index fccc12afa..6db5bb495 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -971,6 +971,19 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
+ * Differs from another field
+ *
+ * @param string
+ * @param string field
+ * @return bool
+ */
+ public function differs($str, $field)
+ {
+ return ! (isset($this->_field_data[$field]) && $this->_field_data[$field]['postdata'] === $str);
+ }
+
+ // --------------------------------------------------------------------
+ /**
* Is Unique
*
* Check if the input value doesn't already exist