refactor(01): tax id rule

This commit is contained in:
puriphatt 2024-09-03 10:34:00 +07:00
parent aaa168b565
commit eda7dd84f1
3 changed files with 6 additions and 1 deletions

View file

@ -110,11 +110,14 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
class="col-md-5 col-12"
:label="$t('branch.form.taxNo')"
v-model="taxNo"
mask="#############"
:rules="[
(val) => (val && val.length > 0) || $t('form.error.required'),
(val) =>
(val && val.length === 13 && /[0-9]+/.test(val)) ||
$t('form.error.invalid'),
$t('form.error.invalidCustomeMessage', {
msg: $t('form.error.requireLength', { msg: 13 }),
}),
]"
for="input-tax-no"
/>