summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorJonoB <jon@accountsportal.com>2012-03-05 10:51:27 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-03-06 10:55:31 +0100
commit883f80f7ed758f384847af3db0082f9fb6e525ee (patch)
tree297abc9eac81c5d0e07369e0b191ac9b2c25f0bf /user_guide_src/source
parent567474528e0c1a4e305dbe8787b83e526b46eb02 (diff)
Removed reset_validation() method from run() method
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/libraries/form_validation.rst11
2 files changed, 12 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 683dd5516..6c8344248 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -85,6 +85,7 @@ Release Date: Not Released
- Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which makes token regeneration optional.
- 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.
- Changed the Session library to select only one row when using database sessions.
- Core
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 0d6a49e79..5aa64d032 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -597,6 +597,9 @@ In this case, you can specify the array to be validated::
Creating validation rules, running the validation and retrieving error messages works the same whether you are
validating $_POST data or an array.
+**Important Note:** If you want to validate more than one array during a single execution, then you should
+call the reset_validation() function before setting up rules and validating the new array.
+
For more info please see the :ref:`function-reference` section below.
-.. _saving-groups:
@@ -966,6 +969,14 @@ $this->form_validation->set_data();
Permits you to set an array for validation, instead of using the default
$_POST array.
+$this->form_validation->reset_validation();
+========================================
+
+ .. php:method:: reset_validation ()
+
+ Permits you to reset the validation when you validate more than one array.
+ This function should be called before validating each new array.
+
$this->form_validation->error_array();
========================================