diff options
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 20 |
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 |