refactor: handle codeHome Not required

This commit is contained in:
Thanaphon Frappet 2024-10-28 13:13:19 +07:00
parent c948a533c7
commit 50abe7ad20

View file

@ -306,8 +306,8 @@ watch(districtId, fetchSubDistrict);
disabledRule
? []
: [
(val) => (val && val.length > 0) || $t('form.error.required'),
(val) =>
!val ||
(val && val.length === 11 && /[0-9]+/.test(val)) ||
$t('form.error.invalidCustomeMessage', {
msg: $t('form.error.requireLength', { msg: 11 }),