summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-10 22:47:59 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-10 22:47:59 +0100
commit0895243fad21dab3ebc4261fe3a6c5b4b32b71e4 (patch)
tree23e1a420639e1c6a9cc78425924e1d6225278212 /system/libraries/Form_validation.php
parent5cf9fdcf08cdfba2078c6a055cccc93043730aeb (diff)
parenta769debeafafb8d5488fce8dc21f6c555452357d (diff)
Automated merge with http://hg.ellislab.com/CodeIgniterNoPhp4/
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index d62071b79..bf3689058 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -77,7 +77,7 @@ class CI_Form_validation {
// No reason to set rules if we have no POST data
if (count($_POST) == 0)
{
- return;
+ return $this;
}
// If an array was passed via the first parameter instead of indidual string
@@ -98,13 +98,13 @@ class CI_Form_validation {
// Here we go!
$this->set_rules($row['field'], $label, $row['rules']);
}
- return;
+ return $this;
}
// No fields? Nothing to do...
if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
{
- return;
+ return $this;
}
// If the field label wasn't passed we use the field name
@@ -146,6 +146,8 @@ class CI_Form_validation {
'postdata' => NULL,
'error' => ''
);
+
+ return $this;
}
// --------------------------------------------------------------------
@@ -169,6 +171,8 @@ class CI_Form_validation {
}
$this->_error_messages = array_merge($this->_error_messages, $lang);
+
+ return $this;
}
// --------------------------------------------------------------------
@@ -187,6 +191,8 @@ class CI_Form_validation {
{
$this->_error_prefix = $prefix;
$this->_error_suffix = $suffix;
+
+ return $this;
}
// --------------------------------------------------------------------