forked from verdnatura/salix-front
fix: replace inputMin rule
This commit is contained in:
parent
0f5d06614d
commit
6a81076874
|
@ -55,8 +55,7 @@ defineExpose({
|
||||||
|
|
||||||
const inputRules = (val) => {
|
const inputRules = (val) => {
|
||||||
const { min } = vnInputRef.value.$attrs;
|
const { min } = vnInputRef.value.$attrs;
|
||||||
if (min >= 0)
|
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
||||||
if (val.toString().indexOf('.') < min) return t('inputMin', { value: min });
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue