summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmedul Haque Abid <a_h_abid@hotmail.com>2014-01-09 11:01:31 +0100
committerAhmedul Haque Abid <a_h_abid@hotmail.com>2014-01-09 11:01:31 +0100
commitea29488b99f28b32887f0cb1e939c5f34e418d0d (patch)
tree54cd5b0be14cad9ec5e39d77c2e2cedbf357dabd
parente9b0ccc3a686772b5b26c5b6d0ae2f35d48fb4c3 (diff)
Changed the rest of 'error_msg' to 'errors'
-rw-r--r--system/libraries/Form_validation.php12
-rw-r--r--user_guide_src/source/libraries/form_validation.rst2
2 files changed, 7 insertions, 7 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 2bebd2f9a..c410e4228 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -178,7 +178,7 @@ class CI_Form_validation {
$label = isset($row['label']) ? $row['label'] : $row['field'];
// Add the custom error message array
- $errors = (isset($row['error_msg']) && is_array($row['error_msg'])) ? $row['error_msg'] : array();
+ $errors = (isset($row['errors']) && is_array($row['errors'])) ? $row['errors'] : array();
// Here we go!
$this->set_rules($row['field'], $label, $row['rules'], $errors);
@@ -229,7 +229,7 @@ class CI_Form_validation {
'field' => $field,
'label' => $label,
'rules' => $rules,
- 'error_msg' => $errors,
+ 'errors' => $errors,
'is_array' => $is_array,
'keys' => $indexes,
'postdata' => NULL,
@@ -609,9 +609,9 @@ class CI_Form_validation {
$type = in_array('required', $rules) ? 'required' : 'isset';
// Check if a custom message is defined
- if (isset($this->_field_data[$row['field']]['error_msg'][$type]))
+ if (isset($this->_field_data[$row['field']]['errors'][$type]))
{
- $line = $this->_field_data[$row['field']]['error_msg'][$type];
+ $line = $this->_field_data[$row['field']]['errors'][$type];
}
elseif (isset($this->_error_messages[$type]))
{
@@ -758,9 +758,9 @@ class CI_Form_validation {
if ($result === FALSE)
{
// Check if a custom message defined
- if(isset($this->_field_data[$row['field']]['error_msg'][$rule]))
+ if(isset($this->_field_data[$row['field']]['errors'][$rule]))
{
- $line = $this->_field_data[$row['field']]['error_msg'][$rule];
+ $line = $this->_field_data[$row['field']]['errors'][$rule];
}
elseif ( ! isset($this->_error_messages[$rule]))
{
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 00f7c4125..3efdc862b 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -267,7 +267,7 @@ you use this approach, you must name your array keys as indicated::
'field' => 'password',
'label' => 'Password',
'rules' => 'required',
- 'error_msg' => array(
+ 'errors' => array(
'required' => 'You must provide a %s.',
),
),