From eca885df9d2c763f97fca04c5fec14ee420b0fa3 Mon Sep 17 00:00:00 2001 From: Lance Vincent Date: Wed, 28 Jan 2015 17:43:23 +0800 Subject: Form Validation - In Method Returns true if a given value matches any of the specified list --- user_guide_src/source/libraries/form_validation.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src/source') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 2b7780ff2..69b6c688a 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -962,6 +962,7 @@ Rule Parameter Description not numeric. **less_than_equal_to** Yes Returns FALSE if the form element is greater than the parameter value, less_than_equal_to[8] or not numeric. +**in** Yes Returns FALSE if the form element is not within a predetermined list. in[red,blue,green] **alpha** No Returns FALSE if the form element contains anything other than alphabetical characters. **alpha_numeric** No Returns FALSE if the form element contains anything other than alpha-numeric characters. **alpha_numeric_spaces** No Returns FALSE if the form element contains anything other than alpha-numeric characters -- cgit v1.2.3-24-g4f1b From 49f483d57f4f95fc2b6d35e97ff368f15e97a5ae Mon Sep 17 00:00:00 2001 From: Lance Vincent Date: Wed, 28 Jan 2015 22:46:19 +0800 Subject: change in to in_list --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 4ba3a33b7..2d05d1b2f 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -961,7 +961,7 @@ Rule Parameter Description not numeric. **less_than_equal_to** Yes Returns FALSE if the form element is greater than the parameter value, less_than_equal_to[8] or not numeric. -**in** Yes Returns FALSE if the form element is not within a predetermined list. in[red,blue,green] +**in_list** Yes Returns FALSE if the form element is not within a predetermined list. in_list[red,blue,green] **alpha** No Returns FALSE if the form element contains anything other than alphabetical characters. **alpha_numeric** No Returns FALSE if the form element contains anything other than alpha-numeric characters. **alpha_numeric_spaces** No Returns FALSE if the form element contains anything other than alpha-numeric characters -- cgit v1.2.3-24-g4f1b From 8f72ecb89b7a8a0ca7bba54503016c5c8e445608 Mon Sep 17 00:00:00 2001 From: Lance Vincent Date: Wed, 28 Jan 2015 22:46:49 +0800 Subject: updated formatting on changelog entry for in_list --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0f89077b1..f0202dd02 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -350,10 +350,10 @@ Release Date: Not Released - Removed method ``is_numeric()`` as it exists as a native PHP function and ``_execute()`` will find and use that (the **is_numeric** rule itself is deprecated since 1.6.1). - Native PHP functions used as rules can now accept an additional parameter, other than the data itself. - Updated method ``set_rules()`` to accept an array of rules as well as a string. - - Added support for ``in`` method that test if a given value is within a given list. - Fields that have empty rules set no longer run through validation (and therefore are not considered erroneous). - Added rule **differs** to check if the value of a field differs from the value of another field. - Added rule **valid_url**. + - Added rule **in_list** to check if the value of a field is within a given list. - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. -- cgit v1.2.3-24-g4f1b