fix : member

Deskripsi:
- fix jumlah digit nomor telepon pada halaman tambah dan edit member

No Issues
This commit is contained in:
amel
2024-12-26 14:11:43 +08:00
parent c20667bbff
commit dd1877544f
2 changed files with 2 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ export default function CreateMember() {
nilai = false nilai = false
} }
if (listData.phone == "" || !(listData.phone.length >= 10 && listData.phone.length <= 15)) { if (listData.phone == "" || !(listData.phone.length >= 9 && listData.phone.length <= 15)) {
setTouched(touched => ({ ...touched, phone: true })) setTouched(touched => ({ ...touched, phone: true }))
nilai = false nilai = false
} }

View File

@@ -155,7 +155,7 @@ export default function EditMember({ id }: { id: string }) {
} }
} else if (kategori == 'phone') { } else if (kategori == 'phone') {
setData({ ...data, phone: val }) setData({ ...data, phone: val })
if (val == "" || !(val.length >= 10 && val.length <= 15)) { if (val == "" || !(val.length >= 9 && val.length <= 15)) {
setTouched({ ...touched, phone: true }) setTouched({ ...touched, phone: true })
} else { } else {
setTouched({ ...touched, phone: false }) setTouched({ ...touched, phone: false })