Skip to content

Commit 24ab886

Browse files
committed
fn validate, errorSpan exists, append err msg to existing
if parent container wraps more than 1 input (errorSpan exists), future err msgs over-write prev err msgs. append adds comma & space, then next err msg.
1 parent 59b3195 commit 24ab886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

form-validator/jquery.form-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
var $parent = $input.parent(),
311311
$errorSpan = $parent.find('span[class='+config.errorMessageClass+']');
312312
if ($errorSpan.length > 0) {
313-
$errorSpan.text($input.valAttr('current-error'));
313+
$errorSpan.append(', '+$input.valAttr('current-error'));
314314
} else {
315315
$parent.append('<span class="'+config.errorMessageClass+'">' + $input.valAttr('current-error') + '</span>');
316316
}

0 commit comments

Comments
 (0)