summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-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;