summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/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 /user_guide_src/source/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 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/form_validation.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 39b389f09..5d7368ccb 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -523,7 +523,7 @@ Changing the Error Delimiters
By default, the Form Validation class adds a paragraph tag (<p>) around
each error message shown. You can either change these delimiters
-globally or individually.
+globally, individually, or change the defaults in a config file.
#. **Changing delimiters Globally**
To globally change the error delimiters, in your controller function,
@@ -543,6 +543,12 @@ globally or individually.
<?php echo validation_errors('<div class="error">', '</div>'); ?>
+#. **Set delimiters in a config file**
+ You can add your error delimiters in application/config/form_validation.php as follows::
+
+ $config['error_prefix'] = '<div class="error_prefix">';
+ $config['error_suffix'] = '</div>';
+
Showing Errors Individually
===========================