From d2df9bc7cc9d4b3e53818470c5d0977c9a36677c Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Sun, 15 Apr 2007 17:41:17 +0000 Subject: update pMachine to EllisLab update copyright year update Code Igniter to CodeIgniter --- user_guide/libraries/validation.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'user_guide/libraries/validation.html') diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html index ce06cf883..502200862 100644 --- a/user_guide/libraries/validation.html +++ b/user_guide/libraries/validation.html @@ -2,7 +2,7 @@ -Code Igniter User Guide +CodeIgniter User Guide @@ -22,7 +22,7 @@ window.onload = function() { - + @@ -33,7 +33,7 @@ window.onload = function() {
- +

Code Igniter User Guide Version 1.5.2

CodeIgniter User Guide Version 1.5.3

@@ -45,7 +45,7 @@ window.onload = function() { @@ -62,7 +62,7 @@ Form Validation

Form Validation

-

Before explaining Code Igniter's approach to data validation, let's describe the ideal scenario:

+

Before explaining CodeIgniter's approach to data validation, let's describe the ideal scenario:

  1. A form is displayed.
  2. @@ -88,12 +88,12 @@ and not exceed a maximum length. The username can't be someone else's existing u amount of code, and to display error messages, various control structures are usually placed within the form HTML. Form validation, while simple to create, is generally very messy and tedious to implement.

    -Code Igniter provides a comprehensive validation framework that truly minimizes the amount of code you'll write. +CodeIgniter provides a comprehensive validation framework that truly minimizes the amount of code you'll write. It also removes all control structures from your form HTML, permitting it to be clean and free of code.

    Overview

    -

    In order to implement Code Igniter's form validation you'll need three things:

    +

    In order to implement CodeIgniter's form validation you'll need three things:

    1. A View file containing the form.
    2. @@ -229,7 +229,7 @@ function only returns "true" if it has successfully applied your rules without a

      Setting Validation Rules

      -

      Code Igniter lets you set as many validation rules as you need for a given field, cascading them in order, and it even lets you prep and pre-process the field data +

      CodeIgniter lets you set as many validation rules as you need for a given field, cascading them in order, and it even lets you prep and pre-process the field data at the same time. Let's see it in action, we'll explain it afterwards.

      In your controller (form.php), add this code just below the validation initialization function:

      @@ -290,7 +290,7 @@ this code, placed in your controller:

      Cascading Rules

      -

      Code Igniter lets you pipe multiple rules together. Let's try it. Change your rules array like this:

      +

      CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules array like this:

      $rules['username'] = "required|min_length[5]|max_length[12]";
      @@ -715,7 +715,7 @@ Previous Topic:  User Agent Class User Guide Home   ·   Next Topic:  XML-RPC Class

      -

      Code Igniter  ·  Copyright © 2006  ·  Ellislab, Inc.

      +

      CodeIgniter  ·  Copyright © 2007  ·  Ellislab, Inc.

      -- cgit v1.2.3-24-g4f1b