From 5d12d9f89f25b8bceb6d914dfef0581321b726ed Mon Sep 17 00:00:00 2001 From: Miqdad Date: Tue, 12 Aug 2025 09:38:20 +0700 Subject: PIC num cannot be same --- src-migrate/validations/tempo.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src-migrate') diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts index 38380d5a..b2239d8c 100644 --- a/src-migrate/validations/tempo.ts +++ b/src-migrate/validations/tempo.ts @@ -202,8 +202,8 @@ export const TempoSchemaPengiriman = z message: 'Format nomor telepon tidak valid, contoh: 081234567890 atau 021234567890', }), + }) + .refine((data) => data.PICBarangMobile !== data.invoicePicMobile, { + message: 'Nomor HP PIC Barang tidak boleh sama dengan Nomor HP PIC Invoice', + path: ['invoicePicMobile', 'PICBarangMobile'], }); - // .refine((data) => data.PICBarangMobile !== data.invoicePicMobile, { - // message: 'Nomor HP PIC Barang tidak boleh sama dengan Nomor HP PIC Invoice', - // path: ['invoicePicMobile'], // error akan tampil di bawah field invoicePicMobile - // }); -- cgit v1.2.3