summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-02-24 16:06:28 +0100
committerMike Funk <mfunk@xulonpress.com>2012-02-24 16:06:28 +0100
commit326a5e75db1e03e453f488f2d612b0f421806129 (patch)
tree24d1484a9d3be7dcf666b9abcde55648669cbe31 /system/libraries
parentceec45609be0ebc2319e9e21a25eb1642f4eef06 (diff)
added config process method checking for delimiter values, updated changelog and user guide.
Diffstat (limited to 'system/libraries')
-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 0a6a2af0d..93ec8b34a 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -55,6 +55,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;
@@ -69,6 +72,27 @@ class CI_Form_validation {
log_message('debug', "Form Validation Class Initialized");
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * if prefixes/suffixes set in config, assign and unset.
+ *
+ * @return void
+ */
+ private 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']);
+ }
+ }
// --------------------------------------------------------------------