Updating VnInput
gitea/hedera-web/pipeline/pr-4922-vueMigration This commit looks good Details

This commit is contained in:
William Buezas 2024-08-19 08:44:40 -03:00
parent 05d735702e
commit 73eb3dcbee
1 changed files with 11 additions and 2 deletions

View File

@ -56,10 +56,14 @@ defineExpose({
const inputRules = [
val => {
const { min } = vnInputRef.value.$attrs;
console.log('asd');
const { min, max } = vnInputRef.value.$attrs;
if (min >= 0) {
if (Math.floor(val) < min) return t('inputMin', { value: min });
}
if (max > 0) {
if (Math.floor(val) > max) return t('inputMax', { value: max });
}
}
];
</script>
@ -111,12 +115,17 @@ const inputRules = [
<i18n lang="yaml">
en-US:
inputMin: Must be more than {value}
inputMax: Must be less than {value}
es-ES:
inputMin: Must be more than {value}
inputMin: Debe ser mayor a {value}
inputMax: Debe ser menor a {value}
ca-ES:
inputMin: Ha de ser més gran que {value}
inputMax: Ha de ser menys que {value}
fr-FR:
inputMin: Doit être supérieur à {value}
inputMax: Doit être supérieur à {value}
pt-PT:
inputMin: Deve ser maior que {value}
inputMax: Deve ser maior que {value}
</i18n>