Add hint for inputs in Welcome Dialog

This commit is contained in:
2024-11-29 11:34:35 +01:00
parent 878c21be4f
commit 1d49f210c5
2 changed files with 33 additions and 4 deletions

View File

@@ -168,4 +168,32 @@ export function getIbanRules() {
}
}
]
}
export function getRegisterNumberRules() {
const feedbackStore = useFeedbackStore()
return [
value => {
if (value) {
return true
} else {
return feedbackStore.i18n.t('misc.validation.required')
}
},
value => {
if (value?.length >= 8) {
return true
} else {
return feedbackStore.i18n.t('misc.validation.notEnoughChars')
}
},
value => {
if(!isNaN(value) && !isNaN(parseFloat(value))) {
return true
} else {
return feedbackStore.i18n.t('misc.validation.onlyDigitsAllowed')
}
}
]
}