moved delimiter assigning to constructor, removed extra function.
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f3535b2..3e16d69 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -54,7 +54,16 @@
$this->CI =& get_instance();
// applies delimiters set in config file.
- $rules = $this->_config_delimiters($rules);
+ 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;
@@ -70,29 +79,6 @@
log_message('debug', "Form Validation Class Initialized");
}
-
- // --------------------------------------------------------------------
-
- /**
- * if prefixes/suffixes set in config, assign and unset.
- *
- * @param array
- * @return array
- */
- protected function _config_delimiters($rules)
- {
- 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']);
- }
- return $rules;
- }
// --------------------------------------------------------------------