summaryrefslogtreecommitdiffstats
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
parent5e12894eb97cc902892b7c4de79bec55772f7b83 (diff)
Fixed a bug in Validation where individual error messages for checkboxes wasn't supported.
-rw-r--r--system/libraries/Validation.php10
-rw-r--r--user_guide/changelog.html1
2 files changed, 9 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;
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index d8bdc7996..152dd4812 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -92,6 +92,7 @@ Change Log
<li>Fixed a bug in <kbd>word_wrap()</kbd> of the Text Helper that incorrectly referenced an object. </li>
<li>Fixed a bug in the <a href="./libraries/email.html">Email</a> library where some timezones were calculated incorrectly. </li>
<li>Fixed a bug in <a href="./libraries/validation.html">Validation</a> where <kbd>valid_ip()</kbd> wasn't called properly.</li>
+ <li>Fixed a bug in <a href="./libraries/validation.html">Validation</a> where individual error messages for checkboxes wasn't supported.</li>
<li>Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space. </li>
<li>Fixed a bug in database driver where num_rows property wasn't getting updated.</li>
<li>Fixed a bug in captcha calling an invalid PHP function.</li>