diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-06-14 13:53:17 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-06-14 13:53:17 +0200 |
commit | 9128231452f3ccea857a848b61bd0e6e9e319737 (patch) | |
tree | 8fc1de596a58a1d1cc1d7c4acaf5596649dda5ea /user_guide_src/source/libraries/form_validation.rst | |
parent | b30a7c0d53c5dae5dab2311f777d67f639a5cee4 (diff) | |
parent | 19c83f6ec6dd29b2ecbeba87801d275f4e247678 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
Diffstat (limited to 'user_guide_src/source/libraries/form_validation.rst')
-rw-r--r-- | user_guide_src/source/libraries/form_validation.rst | 6 |
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 |