From cd194340952887865a79fc898dd0a10272e9b949 Mon Sep 17 00:00:00 2001 From: marina Date: Wed, 28 May 2025 15:13:45 +0300 Subject: [PATCH] ERP-417 --- erp24/web/js/validate/validateForm.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index 16f20e6d..f9ca9eea 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -48,7 +48,11 @@ $(".form-validate button").click(function (e) { renderErrors(errors); let allErrors = []; $.each(errors, function(key, val) { - allErrors = allErrors.concat(val); + if (Array.isArray(val)) { + allErrors = allErrors.concat(val); + } else { + allErrors.push(val); + } }); alert(allErrors.join('\n')); } else { -- 2.39.5