From f9311136d9f821b7b0b1f2fa7c933f51803d4f96 Mon Sep 17 00:00:00 2001 From: Kevin Wood-Friend Date: Tue, 12 Jun 2012 10:57:57 -0400 Subject: Updated Form Validation's documentation for set_rules() now accepting an array of rules --- user_guide_src/source/libraries/form_validation.rst | 6 +++++- 1 file changed, 5 insertions(+), 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 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 -- cgit v1.2.3-24-g4f1b