From 5a9e202118a0c8a5e9536cb09464ba4388f15fab 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..1e9fed0114 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 ? true : false, errorMessage, }; }; @@ -57,4 +57,4 @@ const validateIsEmptyField = (field) => { return validatorOutput; }; -export { formatErrorLine, validateIsEmptyField }; +export { formatErrorLine, validateIsEmptyField, checkIsEmpty };