diff options
author | Mike Funk <mfunk@xulonpress.com> | 2012-03-12 15:13:25 +0100 |
---|---|---|
committer | Mike Funk <mfunk@xulonpress.com> | 2012-03-12 15:13:25 +0100 |
commit | 994105cb45eba44b62bab41dfce76582b34c6913 (patch) | |
tree | 2eee60470e7d2007e5b59d2ad90c70db1a1729aa /user_guide_src | |
parent | 306f56c1bfdafd149b1059325a687ec1a185d00f (diff) | |
parent | 6b4deae9143c4419654e4321fe49330eca493acf (diff) |
merged with latest develop.
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 | ||||
-rw-r--r-- | user_guide_src/source/libraries/form_validation.rst | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5707cf13a..461c1be2d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -88,6 +88,7 @@ Release Date: Not Released - Removed SHA1 function in the :doc:`Encryption Library <libraries/encryption>`. - Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which makes token regeneration optional. - Added all_flashdata() method to session class. Returns an associative array of only flashdata. + - Form Validation library now allows setting of error delimiters in the config file via $config['error_prefix'] and $config['error_suffix']. - Added function error_array() to return all error messages as an array in the Form_validation class. - Added function set_data() to Form_validation library, which can be used in place of the default $_POST array. - Added function reset_validation() to form validation library, which resets internal validation variables in case of multiple validation routines. 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 =========================== |