From 96fabe576f4caf78d3c3af759d2d03bab64801f9 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Tue, 23 Sep 2008 01:18:36 +0000 Subject: Fixed a boneheaded mistake I made... --- system/libraries/Form_validation.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 643aecbce..f0c1500df 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -514,7 +514,7 @@ class CI_Form_validation { } else { - $line = $this->_translate_fieldname('isset'); + $line = $this->_error_messages[$rule]; } // Build the error message @@ -646,7 +646,7 @@ class CI_Form_validation { // Did the rule test negatively? If so, grab the error. if ($result === FALSE) - { + { if ( ! isset($this->_error_messages[$rule])) { if (FALSE === ($line = $this->CI->lang->line($rule))) @@ -656,8 +656,8 @@ class CI_Form_validation { } else { - $line = $this->_translate_fieldname($rule); - } + $line = $this->_error_messages[$rule]; + } // Build the error message $message = sprintf($line, $this->_translate_fieldname($row['label']), $param); @@ -707,7 +707,7 @@ class CI_Form_validation { } } - return $this->CI->lang->line($fieldname); + return $fieldname; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b