From 6a81076874456a8a31510bf8f77af13e107eff1e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 6 May 2024 08:45:29 +0200 Subject: [PATCH] fix: replace inputMin rule --- src/components/common/VnInput.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 0d7d6edca..3f7e46367 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -55,8 +55,7 @@ defineExpose({ const inputRules = (val) => { const { min } = vnInputRef.value.$attrs; - if (min >= 0) - if (val.toString().indexOf('.') < min) return t('inputMin', { value: min }); + if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min }); };