summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/form_validation.rst
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
commit3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch)
treef32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /user_guide_src/source/libraries/form_validation.rst
parent275cf274860c6ed181d50b398efd3a21d7ba9135 (diff)
parenta9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: user_guide_src/source/changelog.rst Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'user_guide_src/source/libraries/form_validation.rst')
-rw-r--r--user_guide_src/source/libraries/form_validation.rst11
1 files changed, 4 insertions, 7 deletions
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 4d1940212..a3a35b499 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -288,8 +288,8 @@ CodeIgniter lets you pipe multiple rules together. Let's try it. Change
your rules in the third parameter of rule setting function, like this::
$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]');
- $this->form_validation->set_rules('password', 'Password', 'required|matches[passconf]');
- $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');
+ $this->form_validation->set_rules('password', 'Password', 'required');
+ $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]');
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]');
The above code sets the following rules:
@@ -315,8 +315,8 @@ can also prep your data in various ways. For example, you can set up
rules like this::
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|xss_clean');
- $this->form_validation->set_rules('password', 'Password', 'trim|required|matches[passconf]|md5');
- $this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required');
+ $this->form_validation->set_rules('password', 'Password', 'trim|required|md5');
+ $this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required|matches[password]');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
In the above example, we are "trimming" the fields, converting the
@@ -910,9 +910,6 @@ Rule Parameter Description
to two parameters, where at least one is required (to pass
the field data).
-.. note:: When using the **matches** rule, the form item specified
- to compare against must already be defined.
-
******************
Prepping Reference
******************