From 01d1a5b936556f3b19786b7407cce11cf3bdb616 Mon Sep 17 00:00:00 2001
From: Phil Sturgeon The Release Date: n/a Release Date: January 28, 2011 Release Date: n/a indicates items that were contributed to CodeIgniter via CodeIgniter Reactor.
Version 2.0.1
+
+Hg Tag: n/aBug fixes for 2.0.1
+
+
+
Version 2.0.0
Hg Tag: v2.0.0
Hg Tag: n/a
+
+
+
+ Bug fixes for 2.0.1
The following is a list of all the native rules that are available to use:
-Rule | -Parameter | -Description | -Example | -
---|---|---|---|
required | -No | -Returns FALSE if the form element is empty. | -- |
matches | -Yes | -Returns FALSE if the form element does not match the one in the parameter. | -matches[form_item] | -
min_length | -Yes | -Returns FALSE if the form element is shorter then the parameter value. | -min_length[6] | -
max_length | -Yes | -Returns FALSE if the form element is longer then the parameter value. | -max_length[12] | -
exact_length | -Yes | -Returns FALSE if the form element is not exactly the parameter value. | -exact_length[8] | -
alpha | -No | -Returns FALSE if the form element contains anything other than alphabetical characters. | -- |
alpha_numeric | -No | -Returns FALSE if the form element contains anything other than alpha-numeric characters. | -- |
alpha_dash | -No | -Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes. | -- |
numeric | -No | -Returns FALSE if the form element contains anything other than numeric characters. | -- |
integer | -No | -Returns FALSE if the form element contains anything other than an integer. | -- |
is_natural | -No | -Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc. | -- |
is_natural_no_zero | -No | -Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc. | -- |
valid_email | -No | -Returns FALSE if the form element does not contain a valid email address. | -- |
valid_emails | -No | -Returns FALSE if any value provided in a comma separated list is not a valid email. | -- |
valid_ip | -No | -Returns FALSE if the supplied IP is not valid. | -- |
valid_base64 | -No | -Returns FALSE if the supplied string contains anything other than valid Base64 characters. | -- |
Rule | +Parameter | +Description | +Example | +
required | +No | +Returns FALSE if the form element is empty. | ++ |
matches | +Yes | +Returns FALSE if the form element does not match the one in the parameter. | +matches[form_item] | +
min_length | +Yes | +Returns FALSE if the form element is shorter then the parameter value. | +min_length[6] | +
max_length | +Yes | +Returns FALSE if the form element is longer then the parameter value. | +max_length[12] | +
exact_length | +Yes | +Returns FALSE if the form element is not exactly the parameter value. | +exact_length[8] | +
greater_than | +Yes | +Returns FALSE if the form element is less than the parameter value or not numeric. | +greater_than[8] | +
less_than | +Yes | +Returns FALSE if the form element is greater than the parameter value or not numeric. | +less_than[8] | +
alpha | +No | +Returns FALSE if the form element contains anything other than alphabetical characters. | ++ |
alpha_numeric | +No | +Returns FALSE if the form element contains anything other than alpha-numeric characters. | ++ |
alpha_dash | +No | +Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes. | ++ |
numeric | +No | +Returns FALSE if the form element contains anything other than numeric characters. | ++ |
integer | +No | +Returns FALSE if the form element contains anything other than an integer. | ++ |
decimal | +Yes | +Returns FALSE if the form element is not exactly the parameter value. | ++ |
is_natural | +No | +Returns FALSE if the form element contains anything other than a natural number: 0, 1, 2, 3, etc. | ++ |
is_natural_no_zero | +No | +Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc. | ++ |
valid_email | +No | +Returns FALSE if the form element does not contain a valid email address. | ++ |
valid_emails | +No | +Returns FALSE if any value provided in a comma separated list is not a valid email. | ++ |
valid_ip | +No | +Returns FALSE if the supplied IP is not valid. | ++ |
valid_base64 | +No | +Returns FALSE if the supplied string contains anything other than valid Base64 characters. | ++ |
Name | -Parameter | -Description | -
---|---|---|
xss_clean | -No | -Runs the data through the XSS filtering function, described in the Input Class page. | -
prep_for_form | -No | -Converts special characters so that HTML data can be shown in a form field without breaking it. | -
prep_url | -No | -Adds "http://" to URLs if missing. | -
strip_image_tags | -No | -Strips the HTML from image tags leaving the raw URL. | -
encode_php_tags | -No | -Converts PHP tags to entities. | -
Name | +Parameter | +Description | +
xss_clean | +No | +Runs the data through the XSS filtering function, described in the Input Class page. | +
prep_for_form | +No | +Converts special characters so that HTML data can be shown in a form field without breaking it. | +
prep_url | +No | +Adds "http://" to URLs if missing. | +
strip_image_tags | +No | +Strips the HTML from image tags leaving the raw URL. | +
encode_php_tags | +No | +Converts PHP tags to entities. | +
Mercurial is a distributed version control system.
-Public Hg access is available at BitBucket. +
Public Hg access is available at BitBucket. Please note that while every effort is made to keep this code base functional, we cannot guarantee the functionality of code taken from the tip.
-- cgit v1.2.3-24-g4f1b From d73eb76bb62e8a81eb186a4b6bff336cc95ba9e8 Mon Sep 17 00:00:00 2001 From: Eric Barnes
$dbs = $this->dbutil->list_databases();
-foreach($dbs as $db)
+foreach ($dbs as $db)
{
echo $db;
}
diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html
index 652cdad29..c843f2f6e 100644
--- a/user_guide/general/alternative_php.html
+++ b/user_guide/general/alternative_php.html
@@ -94,7 +94,7 @@ written in a simplified format as well. Here is an example using foreach:
<ul>
-<?php foreach($todo as $item): ?>
+<?php foreach ($todo as $item): ?>
<li><?=$item?></li>
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
index fd5bde6af..746f7b846 100644
--- a/user_guide/general/views.html
+++ b/user_guide/general/views.html
@@ -233,7 +233,7 @@ class Blog extends CI_Controller {
<h3>My Todo List</h3>
<ul>
-<?php foreach($todo_list as $item):?>
+<?php foreach ($todo_list as $item):?>
<li><?php echo $item;?></li>
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 applications/views/ 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>
--
cgit v1.2.3-24-g4f1b