summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Form_validation.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index cdb3d3d62..f2f3712d9 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -53,6 +53,9 @@ class CI_Form_validation {
{
$this->CI =& get_instance();
+ // applies delimiters set in config file.
+ $this->_config_delimiters();
+
// Validation rules can be stored in a config file.
$this->_config_rules = $rules;
@@ -67,6 +70,27 @@ class CI_Form_validation {
log_message('debug', "Form Validation Class Initialized");
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * if prefixes/suffixes set in config, assign and unset.
+ *
+ * @return void
+ */
+ protected function _config_delimiters()
+ {
+ 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']);
+ }
+ }
// --------------------------------------------------------------------