summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-10-12 22:26:12 +0200
committerdchill42 <dchill42@gmail.com>2012-10-12 22:26:12 +0200
commit93ec20b8d9afbf8cb22ec6383b7fb24fe70330e8 (patch)
tree8ad006bb39a8caee805fb9dd35912b32fc2d9778 /system/libraries/Form_validation.php
parent7ecc5cda6647a4b316b44dc40d5925d9ef63c908 (diff)
parent98ebf4351f8aad58504cd7318ddd94faf0dec482 (diff)
Merge branch 'develop' of github.com:/EllisLab/CodeIgniter into load_config_units
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index b490a34ca..91f46b6de 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -134,12 +134,6 @@ class CI_Form_validation {
// Automatically load the form helper
$this->CI->load->helper('form');
- // Set the character encoding in MB.
- if (MB_ENABLED === TRUE)
- {
- mb_internal_encoding($this->CI->config->item('charset'));
- }
-
log_message('debug', 'Form Validation Class Initialized');
}
@@ -977,6 +971,20 @@ 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