From 42b40006fe8b740b416a8e8fd9acb0666349e222 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 01:10:25 +0600 Subject: Added custom error messages functionality for individual fields. --- system/libraries/Form_validation.php | 24 +++++++++++++++---- user_guide_src/source/changelog.rst | 1 + .../source/libraries/form_validation.rst | 27 ++++++++++++++++++---- 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 852fc7144..e140bc46d 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -144,14 +144,16 @@ class CI_Form_validation { * Set Rules * * This function takes an array of field names and validation - * rules as input, validates the info, and stores it + * rules as input, any custom error messages, validates the info, + * and stores it * * @param mixed $field * @param string $label * @param mixed $rules + * @param array $error_msg * @return CI_Form_validation */ - public function set_rules($field, $label = '', $rules = '') + public function set_rules($field, $label = '', $rules = '', $error_msg = array()) { // No reason to set rules if we have no POST data // or a validation array has not been specified @@ -175,6 +177,9 @@ class CI_Form_validation { // If the field label wasn't passed we use the field name $label = isset($row['label']) ? $row['label'] : $row['field']; + // Add the custom error message array + $error_msg = (isset($row['error_msg']) && is_array($row['error_msg']) ) ? $row['error_msg'] : array(); + // Here we go! $this->set_rules($row['field'], $label, $row['rules']); } @@ -224,6 +229,7 @@ class CI_Form_validation { 'field' => $field, 'label' => $label, 'rules' => $rules, + 'error_msg' => $error_msg, 'is_array' => $is_array, 'keys' => $indexes, 'postdata' => NULL, @@ -602,7 +608,12 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - if (isset($this->_error_messages[$type])) + // Check if a custom message defined, else use default one + if (isset($this->_field_data[$row['field']]['error_msg'][$type])) + { + $line = $this->_field_data[$row['field']]['error_msg'][$type]; + } + elseif (isset($this->_error_messages[$type])) { $line = $this->_error_messages[$type]; } @@ -746,7 +757,12 @@ class CI_Form_validation { // Did the rule test negatively? If so, grab the error. if ($result === FALSE) { - if ( ! isset($this->_error_messages[$rule])) + // Check if a custom message defined, else use default one + if(isset($this->_field_data[$row['field']]['error_msg'][$rule])) + { + $line = $this->_field_data[$row['field']]['error_msg'][$rule]; + } + elseif ( ! isset($this->_error_messages[$rule])) { if (FALSE === ($line = $this->CI->lang->line('form_validation_'.$rule)) // DEPRECATED support for non-prefixed keys diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b0187350..9e7849643 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,6 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. + - Added custom error messages for individual fields on any rules. - :doc:`Caching Library ` changes include: diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 8534175bb..f70877c02 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -200,6 +200,7 @@ The above method takes **three** parameters as input: message. For example, if your field is named "user" you might give it a human name of "Username". #. The validation rules for this form field. +#. (optional) Set custom error messages on any rules given for current field. If not provided will use the default one. .. note:: If you would like the field name to be stored in a language file, please see :ref:`translating-field-names`. @@ -225,7 +226,9 @@ Your controller should now look like this:: $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); - $this->form_validation->set_rules('password', 'Password', 'required'); + $this->form_validation->set_rules('password', 'Password', 'required',array( + 'required'=>'You must provide a %s.' + )); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -263,7 +266,10 @@ you use this approach, you must name your array keys as indicated:: array( 'field' => 'password', 'label' => 'Password', - 'rules' => 'required' + 'rules' => 'required', + 'error_msg' => array( + 'required' => 'You must provide a %s.', + ), ), array( 'field' => 'passconf', @@ -285,7 +291,10 @@ Cascading Rules CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting method, like this:: - $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]'); + $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]',array( + 'required' => 'You have not provided %s.', + 'is_unique' => 'The %s is unavailable.', + )); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]'); $this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]'); @@ -469,11 +478,18 @@ Setting Error Messages All of the native error messages are located in the following language file: **system/language/english/form_validation_lang.php** -To set your own custom message you can either edit that file, or use the -following method:: +To set your own global custom message for a rule, you can either +edit that file, or use the following method:: $this->form_validation->set_message('rule', 'Error Message'); +If you need to set a custom error message for a particular field on +some particular rule, use the set_rules() methos:: + + $this->form_validation->set_rules('field_name','Field Label','rule1|rule2|rule3',array( + 'rule2' => 'Error Message on rule2 for this field_name' + )); + Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed. @@ -946,6 +962,7 @@ $this->form_validation->set_rules() :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. + :param array $error_msg: Custom error message on any rules for the current field only. (optional) :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From 0742fad5cb283693bf1ef0a63aa90bb6cb2927d8 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:51:10 +0600 Subject: Changed $error_msg to $errors --- system/libraries/Form_validation.php | 8 ++++---- user_guide_src/source/libraries/form_validation.rst | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index e140bc46d..55ef28c80 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -150,10 +150,10 @@ class CI_Form_validation { * @param mixed $field * @param string $label * @param mixed $rules - * @param array $error_msg + * @param array $errors * @return CI_Form_validation */ - public function set_rules($field, $label = '', $rules = '', $error_msg = array()) + public function set_rules($field, $label = '', $rules = '', $errors = array()) { // No reason to set rules if we have no POST data // or a validation array has not been specified @@ -178,7 +178,7 @@ class CI_Form_validation { $label = isset($row['label']) ? $row['label'] : $row['field']; // Add the custom error message array - $error_msg = (isset($row['error_msg']) && is_array($row['error_msg']) ) ? $row['error_msg'] : array(); + $errors = (isset($row['error_msg']) && is_array($row['error_msg']) ) ? $row['error_msg'] : array(); // Here we go! $this->set_rules($row['field'], $label, $row['rules']); @@ -229,7 +229,7 @@ class CI_Form_validation { 'field' => $field, 'label' => $label, 'rules' => $rules, - 'error_msg' => $error_msg, + 'error_msg' => $errors, 'is_array' => $is_array, 'keys' => $indexes, 'postdata' => NULL, diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index f70877c02..671f97992 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -957,12 +957,12 @@ The following methods are intended for use in your controller. $this->form_validation->set_rules() =================================== - .. php:method:: set_rules ($field, $label = '', $rules = '') + .. php:method:: set_rules ($field, $label = '', $rules = '', $errors = array()) :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. - :param array $error_msg: Custom error message on any rules for the current field only. (optional) + :param array $errors: Custom error message :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From bc1cbad058f052e5f5dda85602056c26be94094c Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:53:34 +0600 Subject: Fixed a missed variable $errors in set_rules(). --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 55ef28c80..3ec03ae16 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -181,7 +181,7 @@ class CI_Form_validation { $errors = (isset($row['error_msg']) && is_array($row['error_msg']) ) ? $row['error_msg'] : array(); // Here we go! - $this->set_rules($row['field'], $label, $row['rules']); + $this->set_rules($row['field'], $label, $row['rules'], $errors); } return $this; -- cgit v1.2.3-24-g4f1b From 557c6ec87c6d83b20d773d2a5fc84b6a6aebd80f Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:55:04 +0600 Subject: Removed extra space between closing parenthesis. --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 3ec03ae16..5c3c7c6e3 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['error_msg']) && is_array($row['error_msg'])) ? $row['error_msg'] : array(); // Here we go! $this->set_rules($row['field'], $label, $row['rules'], $errors); -- cgit v1.2.3-24-g4f1b From a0bf8295b90302f498a9c1b94a80b50ec635f85c Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:55:52 +0600 Subject: Updated change log message for form validation custrom errors. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9e7849643..37e568c4c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,7 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. - - Added custom error messages for individual fields on any rules. + - Added **support** for custom error messages **per field rule**. - :doc:`Caching Library ` changes include: -- cgit v1.2.3-24-g4f1b From b07a428a804eaa898b00ec50a8893233229def38 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:57:27 +0600 Subject: Updated comment messages. --- system/libraries/Form_validation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 5c3c7c6e3..9efa9f33c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -608,7 +608,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - // Check if a custom message defined, else use default one + // Check if a custom message defined if (isset($this->_field_data[$row['field']]['error_msg'][$type])) { $line = $this->_field_data[$row['field']]['error_msg'][$type]; @@ -757,7 +757,7 @@ class CI_Form_validation { // Did the rule test negatively? If so, grab the error. if ($result === FALSE) { - // Check if a custom message defined, else use default one + // Check if a custom message defined if(isset($this->_field_data[$row['field']]['error_msg'][$rule])) { $line = $this->_field_data[$row['field']]['error_msg'][$rule]; -- cgit v1.2.3-24-g4f1b From df3bda56796ae27f98cd6b9fe5c7d9d3bcb756ac Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 08:10:21 +0600 Subject: Added spaces between parameters and fixed the arrays to be more readable. --- .../source/libraries/form_validation.rst | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 671f97992..00f7c4125 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -226,9 +226,9 @@ Your controller should now look like this:: $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); - $this->form_validation->set_rules('password', 'Password', 'required',array( - 'required'=>'You must provide a %s.' - )); + $this->form_validation->set_rules('password', 'Password', 'required', + array('required'=>'You must provide a %s.') + ); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -291,10 +291,14 @@ Cascading Rules CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting method, like this:: - $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]',array( - 'required' => 'You have not provided %s.', - 'is_unique' => 'The %s is unavailable.', - )); + $this->form_validation->set_rules( + 'username', 'Username', + 'required|min_length[5]|max_length[12]|is_unique[users.username]', + array( + 'required' => 'You have not provided %s.', + 'is_unique' => 'This %s already exists.' + ) + ); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]'); $this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]'); @@ -484,11 +488,11 @@ edit that file, or use the following method:: $this->form_validation->set_message('rule', 'Error Message'); If you need to set a custom error message for a particular field on -some particular rule, use the set_rules() methos:: +some particular rule, use the set_rules() method:: - $this->form_validation->set_rules('field_name','Field Label','rule1|rule2|rule3',array( - 'rule2' => 'Error Message on rule2 for this field_name' - )); + $this->form_validation->set_rules('field_name', 'Field Label', 'rule1|rule2|rule3', + array('rule2' => 'Error Message on rule2 for this field_name') + ); Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed. @@ -962,7 +966,7 @@ $this->form_validation->set_rules() :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. - :param array $errors: Custom error message + :param array $errors: Custom error messages :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From e9b0ccc3a686772b5b26c5b6d0ae2f35d48fb4c3 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 15:58:51 +0600 Subject: Added the missing "is" in the comment --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 9efa9f33c..2bebd2f9a 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -608,7 +608,7 @@ class CI_Form_validation { // Set the message type $type = in_array('required', $rules) ? 'required' : 'isset'; - // Check if a custom message defined + // Check if a custom message is defined if (isset($this->_field_data[$row['field']]['error_msg'][$type])) { $line = $this->_field_data[$row['field']]['error_msg'][$type]; -- cgit v1.2.3-24-g4f1b From ea29488b99f28b32887f0cb1e939c5f34e418d0d Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:01:31 +0600 Subject: Changed the rest of 'error_msg' to 'errors' --- system/libraries/Form_validation.php | 12 ++++++------ user_guide_src/source/libraries/form_validation.rst | 2 +- 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.', ), ), -- cgit v1.2.3-24-g4f1b From d8a3716f2055cabfcdebd0dcbc96b0783785df32 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:03:43 +0600 Subject: Added space after 'if' condition --- system/libraries/Form_validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index c410e4228..5be2b5e9d 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -758,7 +758,7 @@ class CI_Form_validation { if ($result === FALSE) { // Check if a custom message defined - if(isset($this->_field_data[$row['field']]['errors'][$rule])) + if (isset($this->_field_data[$row['field']]['errors'][$rule])) { $line = $this->_field_data[$row['field']]['errors'][$rule]; } -- cgit v1.2.3-24-g4f1b From e334118cef11e9565b9219587d1f45ab140c9bcd Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:10:10 +0600 Subject: Fixed coding styles in form_validation.rst --- user_guide_src/source/libraries/form_validation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 3efdc862b..1076b1433 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -227,7 +227,7 @@ Your controller should now look like this:: $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required', - array('required'=>'You must provide a %s.') + array('required' => 'You must provide a %s.') ); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -295,8 +295,8 @@ your rules in the third parameter of rule setting method, like this:: 'username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]', array( - 'required' => 'You have not provided %s.', - 'is_unique' => 'This %s already exists.' + 'required' => 'You have not provided %s.', + 'is_unique' => 'This %s already exists.' ) ); $this->form_validation->set_rules('password', 'Password', 'required'); -- cgit v1.2.3-24-g4f1b From 7945d30c0c936a553311e7418d388acb4d3fb1af Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:50:23 +0600 Subject: Fixed the comment and array alignment. --- system/libraries/Form_validation.php | 4 ++-- user_guide_src/source/changelog.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 5be2b5e9d..58485916c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -229,7 +229,7 @@ class CI_Form_validation { 'field' => $field, 'label' => $label, 'rules' => $rules, - 'errors' => $errors, + 'errors' => $errors, 'is_array' => $is_array, 'keys' => $indexes, 'postdata' => NULL, @@ -757,7 +757,7 @@ class CI_Form_validation { // Did the rule test negatively? If so, grab the error. if ($result === FALSE) { - // Check if a custom message defined + // Check if a custom message is defined if (isset($this->_field_data[$row['field']]['errors'][$rule])) { $line = $this->_field_data[$row['field']]['errors'][$rule]; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 314ae8ab0..22c6d8f02 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,7 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. - - Added **support** for custom error messages **per field rule**. + - Added support for custom error messages per field rule. - :doc:`Caching Library ` changes include: -- cgit v1.2.3-24-g4f1b