summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-12 14:47:42 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-12 14:47:42 +0100
commit6b4deae9143c4419654e4321fe49330eca493acf (patch)
treee2c4c74050dab4d045f760ba9174a7eba277a47f /system/libraries
parentb3442a165a091c552a3331ece94297d5fe316fee (diff)
parent98626f1b4b3002c64364d82080246b91aa5e4bd2 (diff)
Merge pull request #1079 from mikedfunk/feature/form_val_config
Feature/form val config error_prefix and error_suffix
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 4ad31ebfa..826d94fb0 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;