diff options
Diffstat (limited to 'user_guide/libraries')
-rw-r--r-- | user_guide/libraries/cart.html | 2 | ||||
-rw-r--r-- | user_guide/libraries/file_uploading.html | 2 | ||||
-rw-r--r-- | user_guide/libraries/form_validation.html | 310 |
3 files changed, 171 insertions, 143 deletions
diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html index bc0721bb4..fe87a23f2 100644 --- a/user_guide/libraries/cart.html +++ b/user_guide/libraries/cart.html @@ -178,7 +178,7 @@ $this->cart->insert($data); <?php $i = 1; ?> -<?php foreach($this->cart->contents() as $items): ?> +<?php foreach ($this->cart->contents() as $items): ?> <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?> diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index c5eab4695..5c3162819 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -125,7 +125,7 @@ In it, place this code and save it to your <samp>applications/views/</samp> fold <h3>Your file was successfully uploaded!</h3> <ul> -<?php foreach($upload_data as $item => $value):?> +<?php foreach ($upload_data as $item => $value):?> <li><?php echo $item;?>: <?php echo $value;?></li> <?php endforeach; ?> </ul> 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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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"> </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> |