LSform: fix displaying multiple errors on same field (on Ajax submit)

This commit is contained in:
Benjamin Renard 2021-06-09 14:48:35 +02:00
parent b104454603
commit 077a44fdf9

View file

@ -386,7 +386,8 @@ var LSform = new Class({
addError: function(errors,name) {
var ul = $(name);
if ($type(ul)) {
errors = new Array(errors);
if ($type(errors) != 'array')
errors = new Array(errors);
errors.each(function(txt){
var dd = new Element('dd');
dd.addClass('LSform');