Commit ee1be5f8 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1804784 by SeanBannister: Fixed Bug with support for Field Validation Tokens.

parent 1213cdee
......@@ -26,9 +26,14 @@
Drupal.myClientsideValidation.validators[formid].settings.showErrors = function (errorMap, errorList) {
this.defaultShowErrors();
for (var index in errorList) {
var label = this.errorsFor( errorList[index].element );
var $element = $(errorList[index].element);
var label = this.errorsFor(errorList[index].element);
if ( label.length ) {
label.html(label.html().replace("[value]", $(errorList[index].element).val()));
label.html(
label.html()
.replace("[value]", $element.val())
.replace("[field-name]", $element.closest(".form-item").find('label').text())
);
}
}
}
......
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