summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorRaul Baldner Junior <raul_baldner_junior@hotmail.com>2012-10-11 16:32:23 +0200
committerRaul Baldner Junior <raul_baldner_junior@hotmail.com>2012-10-11 16:32:23 +0200
commitf38564d739455f46eb38bcbfaa8e255d0a50defe (patch)
treee9c4f937c31cc19200b055808edd6409acea21bc /user_guide_src
parent06e9d1d7a4c979a43f9f8fa437526b6c7a547cec (diff)
New form_validation rule: 'differs'
Added new validation rule 'differs'. It checks if the value of a field differs from the value of another field.
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/libraries/form_validation.rst1
2 files changed, 2 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index bfc2c9556..b5f14d551 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -188,6 +188,7 @@ Release Date: Not Released
- Native PHP functions used as rules can now accept an additional parameter, other than the data itself.
- Updated set_rules() to accept an array of rules as well as a string.
- Fields that have empty rules set no longer run through validation (and therefore are not considered erroneous).
+ - Added new rule: ``differs``. It checks if the value of a field differs from the value of another field.
- Added support for setting :doc:`Table <libraries/table>` class defaults in a config file.
- Added a Wincache driver to the :doc:`Caching Library <libraries/caching>`.
- Added a Redis driver to the :doc:`Caching Library <libraries/caching>`.
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 22272dc9b..6c6743d06 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -872,6 +872,7 @@ Rule Parameter Description
========================= ========== ============================================================================================= =======================
**required** No Returns FALSE if the form element is empty.
**matches** Yes Returns FALSE if the form element does not match the one in the parameter. matches[form_item]
+**differs** Yes Returns FALSE if the form element does not differ from the one in the parameter. differs[form_item]
**is_unique** Yes Returns FALSE if the form element is not unique to the table and field name in the is_unique[table.field]
parameter. Note: This rule requires :doc:`Query Builder <../database/query_builder>` to be
enabled in order to work.