fix(01): abbrev letter and number

This commit is contained in:
puriphatt 2024-09-05 10:42:05 +07:00
parent 47d775ca58
commit 7664a60523

View file

@ -57,9 +57,9 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
:rules="[
(val) => (val && val.length > 0) || $t('form.error.required'),
(val) =>
(val && val.length > 0 && /^[a-zA-Z]+$/.test(val)) ||
(val && val.length > 0 && /^[a-zA-Z0-9]+$/.test(val)) ||
$t('form.error.invalidCustomeMessage', {
msg: $t('form.error.letterOnly'),
msg: $t('form.error.letterAndNumOnly'),
}),
]"
@update:model-value="(v) => (abbreviation = v as string)"