summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/form_validation.html
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-16 20:03:49 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-16 20:03:49 +0100
commit33ed0f37b6b8f2223cd3362bf8fca28102ab67c6 (patch)
tree99c613720a2fd8541764bb6fc893e0da28fa269b /user_guide/libraries/form_validation.html
parent154da11c5bb4b7dc5c225f4fa018852ee45cc6eb (diff)
parentd8d1e24eee56d2466c91ecd72b3c8932eb3d0639 (diff)
Merged CodeIgniter Core changes and integrated rob1's secure cookie change into my secure cookie change.
Diffstat (limited to 'user_guide/libraries/form_validation.html')
-rw-r--r--user_guide/libraries/form_validation.html310
1 files changed, 169 insertions, 141 deletions
diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html
index 935dca61f..d6120054b 100644
--- a/user_guide/libraries/form_validation.html
+++ b/user_guide/libraries/form_validation.html
@@ -924,118 +924,146 @@ POST array:</p>
<p>The following is a list of all the native rules that are available to use:</p>
-
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
-<tr>
-<th>Rule</th>
-<th>Parameter</th>
-<th>Description</th>
-<th>Example</th>
-</tr><tr>
-
-<td class="td"><strong>required</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element is empty.</td>
-<td class="td">&nbsp;</td>
-</tr><tr>
-
-<td class="td"><strong>matches</strong></td>
-<td class="td">Yes</td>
-<td class="td">Returns FALSE if the form element does not match the one in the parameter.</td>
-<td class="td">matches[form_item]</td>
-</tr><tr>
-
-<td class="td"><strong>min_length</strong></td>
-<td class="td">Yes</td>
-<td class="td">Returns FALSE if the form element is shorter then the parameter value.</td>
-<td class="td">min_length[6]</td>
-</tr><tr>
-
-<td class="td"><strong>max_length</strong></td>
-<td class="td">Yes</td>
-<td class="td">Returns FALSE if the form element is longer then the parameter value.</td>
-<td class="td">max_length[12]</td>
-</tr><tr>
-
-<td class="td"><strong>exact_length</strong></td>
-<td class="td">Yes</td>
-<td class="td">Returns FALSE if the form element is not exactly the parameter value.</td>
-<td class="td">exact_length[8]</td>
-</tr><tr>
-
-<td class="td"><strong>alpha</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than alphabetical characters.</td>
-<td class="td">&nbsp;</td>
-</tr><tr>
-
-<td class="td"><strong>alpha_numeric</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters.</td>
-<td class="td">&nbsp;</td>
-</tr><tr>
-
-<td class="td"><strong>alpha_dash</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>numeric</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than numeric characters.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>integer</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than an integer.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>is_natural</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>is_natural_no_zero</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>valid_email</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the form element does not contain a valid email address.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>valid_emails</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if any value provided in a comma separated list is not a valid email.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>valid_ip</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the supplied IP is not valid.</td>
-<td class="td">&nbsp;</td>
-</tr>
-
-<tr>
-<td class="td"><strong>valid_base64</strong></td>
-<td class="td">No</td>
-<td class="td">Returns FALSE if the supplied string contains anything other than valid Base64 characters.</td>
-<td class="td">&nbsp;</td>
-</tr>
+ <tr>
+ <th>Rule</th>
+ <th>Parameter</th>
+ <th>Description</th>
+ <th>Example</th>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>required</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element is empty.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>matches</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element does not match the one in the parameter.</td>
+ <td class="td">matches[form_item]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>min_length</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is shorter then the parameter value.</td>
+ <td class="td">min_length[6]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>max_length</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is longer then the parameter value.</td>
+ <td class="td">max_length[12]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>exact_length</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is not exactly the parameter value.</td>
+ <td class="td">exact_length[8]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>greater_than</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is less than the parameter value or not numeric.</td>
+ <td class="td">greater_than[8]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>less_than</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is greater than the parameter value or not numeric.</td>
+ <td class="td">less_than[8]</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>alpha</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than alphabetical characters.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>alpha_numeric</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>alpha_dash</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>numeric</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than numeric characters.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>integer</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than an integer.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>decimal</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is not exactly the parameter value.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>is_natural</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>is_natural_no_zero</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>valid_email</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the form element does not contain a valid email address.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>valid_emails</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if any value provided in a comma separated list is not a valid email.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>valid_ip</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the supplied IP is not valid.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td class="td"><strong>valid_base64</strong></td>
+ <td class="td">No</td>
+ <td class="td">Returns FALSE if the supplied string contains anything other than valid Base64 characters.</td>
+ <td class="td">&nbsp;</td>
+ </tr>
</table>
@@ -1058,36 +1086,36 @@ POST array:</p>
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">
-<tr>
-<th>Name</th>
-<th>Parameter</th>
-<th>Description</th>
-</tr><tr>
-
-<td class="td"><strong>xss_clean</strong></td>
-<td class="td">No</td>
-<td class="td">Runs the data through the XSS filtering function, described in the <a href="input.html">Input Class</a> page.</td>
-</tr><tr>
-
-<td class="td"><strong>prep_for_form</strong></td>
-<td class="td">No</td>
-<td class="td">Converts special characters so that HTML data can be shown in a form field without breaking it.</td>
-</tr><tr>
-
-<td class="td"><strong>prep_url</strong></td>
-<td class="td">No</td>
-<td class="td">Adds "http://" to URLs if missing.</td>
-</tr><tr>
-
-<td class="td"><strong>strip_image_tags</strong></td>
-<td class="td">No</td>
-<td class="td">Strips the HTML from image tags leaving the raw URL.</td>
-</tr><tr>
-
-<td class="td"><strong>encode_php_tags</strong></td>
-<td class="td">No</td>
-<td class="td">Converts PHP tags to entities.</td>
-</tr>
+ <tr>
+ <th>Name</th>
+ <th>Parameter</th>
+ <th>Description</th>
+ </tr><tr>
+
+ <td class="td"><strong>xss_clean</strong></td>
+ <td class="td">No</td>
+ <td class="td">Runs the data through the XSS filtering function, described in the <a href="input.html">Input Class</a> page.</td>
+ </tr><tr>
+
+ <td class="td"><strong>prep_for_form</strong></td>
+ <td class="td">No</td>
+ <td class="td">Converts special characters so that HTML data can be shown in a form field without breaking it.</td>
+ </tr><tr>
+
+ <td class="td"><strong>prep_url</strong></td>
+ <td class="td">No</td>
+ <td class="td">Adds "http://" to URLs if missing.</td>
+ </tr><tr>
+
+ <td class="td"><strong>strip_image_tags</strong></td>
+ <td class="td">No</td>
+ <td class="td">Strips the HTML from image tags leaving the raw URL.</td>
+ </tr><tr>
+
+ <td class="td"><strong>encode_php_tags</strong></td>
+ <td class="td">No</td>
+ <td class="td">Converts PHP tags to entities.</td>
+ </tr>
</table>