From ebc00552be44e38721e026d2259a68604f4f6928 Mon Sep 17 00:00:00 2001 From: Lukasz Ostafin Date: Thu, 12 Dec 2024 11:30:19 +0100 Subject: [PATCH] IBX-9022: Price tab - validation issues --- .../public/js/scripts/helpers/form.validation.helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js b/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js index 8955eded8f..39dea36a46 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js @@ -29,7 +29,7 @@ const checkIsEmpty = (field) => { } return { - isValid: input?.value ?? true, + isValid: (input.value || input.value === 0) ?? false, errorMessage, }; }; @@ -57,4 +57,4 @@ const validateIsEmptyField = (field) => { return validatorOutput; }; -export { formatErrorLine, validateIsEmptyField }; +export { formatErrorLine, validateIsEmptyField, checkIsEmpty };