Commit 12d3c5ad authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1896426 by MXT: Fixed 'FIELD-NAME is a required field' became 'This...

Issue #1896426 by MXT: Fixed 'FIELD-NAME is a required field' became 'This field is required' upgrading to latest DEV.
parent e9dfa82b
......@@ -784,14 +784,14 @@
$form.find('input, textarea, select').each(function(idx, elem) {
var rule = rules[elem.name];
if (rule) {
elem = $(elem);
var $elem = $(elem);
if (typeof self.validators[formid].settings.messages[elem.name] === 'undefined') {
self.validators[formid].settings.messages[elem.name] = {};
}
$.extend(self.validators[formid].settings.messages[elem.name], rule.messages);
delete rule.messages;
$(elem).rules("add",rule);
$(elem).change(hideErrordiv);
$elem.rules("add",rule);
$elem.change(hideErrordiv);
}
});
self.time.stop('rules');
......
......@@ -430,7 +430,7 @@ function _clientside_validation_add_general_settings(&$settings, $form) {
// Add a setting for this form if the hidden elements should still be validated
$include_hidden_setting = $definedsettings['include_hidden']['include_hidden'];
$include_hidden = preg_split('/(\r\n?|\n)/', $include_hidden_setting, -1, PREG_SPLIT_NO_EMPTY);
if (in_array($form['#form_id'], $include_hidden)) {
if (in_array($form['#form_id'], $include_hidden) || in_array($form_id, $include_hidden)) {
$settings['clientsideValidation']['forms'][$form_id]['includeHidden'] = TRUE;
}
elseif ($definedsettings['include_hidden']['include_hidden_fields']) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment