From: marina Date: Wed, 28 May 2025 12:02:01 +0000 (+0300) Subject: ERP-417 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7c4b5b3cc95c22a5d5472b4e07c19d355794b457;p=erp24_rep%2Fyii-erp24%2F.git ERP-417 --- diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index 89bb292d..16f20e6d 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -9,6 +9,7 @@ $(".form-validate button").click(function (e) { if ($('.multiple-input-list__item').length === 0) { $('.messages').html('Добавьте хотя бы один товар.'); + alert('Добавьте хотя бы один товар.'); return false; } @@ -45,6 +46,11 @@ $(".form-validate button").click(function (e) { if (Object.keys(errors).length > 0) { renderErrors(errors); + let allErrors = []; + $.each(errors, function(key, val) { + allErrors = allErrors.concat(val); + }); + alert(allErrors.join('\n')); } else { yiiform.off('submit'); yiiform.submit();