summaryrefslogtreecommitdiffstats
path: root/system/libraries/Validation.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2007-12-31 17:02:32 +0100
committerDerek Allard <derek.allard@ellislab.com>2007-12-31 17:02:32 +0100
commit9805f61a0aca60f3d01e89d1f3d66a2ce9ff3d83 (patch)
tree825d7e989d27c1a46469f5eb65e7b427570ba7ae /system/libraries/Validation.php
parent5e12894eb97cc902892b7c4de79bec55772f7b83 (diff)
Fixed a bug in Validation where individual error messages for checkboxes wasn't supported.
Diffstat (limited to 'system/libraries/Validation.php')
-rw-r--r--system/libraries/Validation.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index 575c5262e..468f2ad4e 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.php
@@ -228,8 +228,14 @@ class CI_Validation {
$line = $this->_error_messages['isset'];
}
- $field = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
- $this->_error_array[] = sprintf($line, $field);
+ // Build the error message
+ $mfield = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
+ $message = sprintf($line, $mfield);
+
+ // Set the error variable. Example: $this->username_error
+ $error = $field.'_error';
+ $this->$error = $this->_error_prefix.$message.$this->_error_suffix;
+ $this->_error_array[] = $message;
}
continue;