summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/form_validation.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index be6d1f233..858ff1ac0 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -714,6 +714,8 @@ file. You can organize these rules into "groups". These groups can
either be loaded automatically when a matching controller/method is
called, or you can manually call each set as needed.
+.. important:: Make sure that when using the ``reset_validation()`` method you pass ``true`` as a parameter. If you do not then all the validation rules loaded from the config file will be cleared as well!
+
How to save your rules
======================
@@ -1076,8 +1078,9 @@ Class Reference
Permits you to set an array for validation, instead of using the default
``$_POST`` array.
- .. php:method:: reset_validation()
+ .. php:method:: reset_validation($keep_config=false)
+ :param bool $keep_config: Will leave configured validation rules alone when true or clear them when false. This parameter must be true if your rules are being loaded from a config file
:returns: CI_Form_validation instance (method chaining)
:rtype: CI_Form_validation
@@ -1137,4 +1140,4 @@ the following functions:
- :php:func:`set_radio()`
Note that these are procedural functions, so they **do not** require you
-to prepend them with ``$this->form_validation``. \ No newline at end of file
+to prepend them with ``$this->form_validation``.