From e287c73eb5d330f80bf85cf58321c38da0e923f4 Mon Sep 17 00:00:00 2001 From: marina Date: Wed, 28 May 2025 15:21:45 +0300 Subject: [PATCH] ERP-417 --- erp24/web/js/validate/validateForm.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index 0c98f894..980f3754 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -44,6 +44,8 @@ $(".form-validate button").click(function (e) { errors['__common'].push('Пожалуйста, добавьте хотя бы одно фото к каждому списанию перед сохранением.'); } + console.log('Ошибки перед alert:', errors); + if (Object.keys(errors).length > 0) { renderErrors(errors); let allErrors = []; @@ -54,6 +56,9 @@ $(".form-validate button").click(function (e) { allErrors.push(errors[key]); } } + + console.log('Собранные ошибки для alert:', allErrors); + alert(allErrors.join('\n')); } else { yiiform.off('submit'); @@ -88,4 +93,4 @@ $(".form-validate button").click(function (e) { var strOut2 = messages.join(',
'); $('.messages').html(strOut2); } -}); +}); \ No newline at end of file -- 2.39.5