summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorKevin Wood-Friend <kwoodfriend@hawthornpublications.com>2012-06-12 16:57:57 +0200
committerKevin Wood-Friend <kwoodfriend@hawthornpublications.com>2012-06-12 17:41:11 +0200
commitf9311136d9f821b7b0b1f2fa7c933f51803d4f96 (patch)
tree2978d9e4af1d7bb7158f296b7572a0883c88b914 /user_guide_src/source
parentfe8f5e25c8127c0ff7ebb77dd5f9b982e9eb9270 (diff)
Updated Form Validation's documentation for set_rules() now accepting an array of rules
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/libraries/form_validation.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 3c0e6eda4..3bcad7ba6 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -304,6 +304,10 @@ Give it a try! Submit your form without the proper data and you'll see
new error messages that correspond to your new rules. There are numerous
rules available which you can read about in the validation reference.
+.. note:: You can also pass an array of rules to set_rules(), instead of a string. Example::
+
+ $this->form_validation->set_rules('username', 'Username', array('required', 'min_length[5]'));
+
Prepping Data
=============
@@ -935,7 +939,7 @@ $this->form_validation->set_rules();
:param string $field: The field name
:param string $label: The field label
- :param string $rules: The rules, seperated by a pipe "|"
+ :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules.
:rtype: Object
Permits you to set validation rules, as described in the tutorial