diff options
author | Roger Herbert <rogerlherbert@gmail.com> | 2012-03-14 09:37:06 +0100 |
---|---|---|
committer | Roger Herbert <rogerlherbert@gmail.com> | 2012-03-14 09:37:06 +0100 |
commit | a5c8a6d0fb7802aaf284b7b3ef77966f43baae56 (patch) | |
tree | 12163c9d08070e73b025dd0a6fc602bccc606e90 /system/libraries/Form_validation.php | |
parent | b81f909f8aaa3bedc3820c0d4c9056b57113b46e (diff) | |
parent | ce707b4cafd64b95031690cf927584b1d60c7ad7 (diff) |
timespan() helper change
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 4ad31ebfa..9491f354c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -53,6 +53,18 @@ class CI_Form_validation { { $this->CI =& get_instance(); + // applies delimiters set in config file. + if (isset($rules['error_prefix'])) + { + $this->_error_prefix = $rules['error_prefix']; + unset($rules['error_prefix']); + } + if (isset($rules['error_suffix'])) + { + $this->_error_suffix = $rules['error_suffix']; + unset($rules['error_suffix']); + } + // Validation rules can be stored in a config file. $this->_config_rules = $rules; @@ -60,7 +72,7 @@ class CI_Form_validation { $this->CI->load->helper('form'); // Set the character encoding in MB. - if (function_exists('mb_internal_encoding')) + if (MB_ENABLED === TRUE) { mb_internal_encoding($this->CI->config->item('charset')); } @@ -938,7 +950,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return ! (mb_strlen($str) < $val); } @@ -962,7 +974,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return ! (mb_strlen($str) > $val); } @@ -986,7 +998,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return (mb_strlen($str) == $val); } |