summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorSai Phaninder Reddy Jonnala <sai.jonnala@gopassport.com>2015-12-28 21:28:02 +0100
committerSai Phaninder Reddy Jonnala <sai.jonnala@gopassport.com>2015-12-28 21:28:02 +0100
commit0951e58f94c970a03f8ac2d5cba31d122bfa948a (patch)
treea886c2b8ee53d55e2781154ea76b22c68d87e908 /system/libraries
parentf3b711fd9f7d8e096bf774f9c6cfc0a4ca075919 (diff)
renamed variable for better readability.
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 12cfdff43..a34694bfe 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -843,33 +843,33 @@ class CI_Form_validation {
* @param array
* @return string
*/
- private function _get_raw_error_message($key, $row)
+ private function _get_raw_error_message($rule_name, $row)
{
$error_message = '';
- // Check if a custom message is defined through validation config row.
- if (isset($this->_field_data[$row['field']]['errors'][$key]))
+ // check if a custom message is defined through validation config row.
+ if (isset($this->_field_data[$row['field']]['errors'][$rule_name]))
{
- $error_message = $this->_field_data[$row['field']]['errors'][$key];
+ $error_message = $this->_field_data[$row['field']]['errors'][$rule_name];
}
// check if a custom message has been set using the set_message() function
- elseif (isset($this->_error_messages[$key]))
+ elseif (isset($this->_error_messages[$rule_name]))
{
- $error_message = $this->_error_messages[$key];
+ $error_message = $this->_error_messages[$rule_name];
}
// check if we have an error message in lang file
- elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$key)))
+ elseif (FALSE !== ($line_tmp = $this->CI->lang->line('form_validation_'.$rule_name)))
{
$error_message = $line_tmp;
}
// DEPRECATED support for non-prefixed keys, lang file again
- elseif (FALSE !== ($line_tmp = $this->CI->lang->line($key, FALSE)))
+ elseif (FALSE !== ($line_tmp = $this->CI->lang->line($rule_name, FALSE)))
{
$error_message = $line_tmp;
}
- //error message not found
+ // error message not found
else
{
- $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$key.')';
+ $error_message = $this->CI->lang->line('form_validation_error_message_not_set').'('.$rule_name.')';
}
return $error_message;