diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-21 16:16:34 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-21 16:16:34 +0700 |
| commit | 3a0f3c6ed7ef886d3205d51937b1ecbb035b1a87 (patch) | |
| tree | ded50fbc40919b389088e1e983637b85fa1eb04e /src-migrate/validations | |
| parent | c61477111b95d83a9b862f242923b911364f3612 (diff) | |
<iman> update and fix section dokumen
Diffstat (limited to 'src-migrate/validations')
| -rw-r--r-- | src-migrate/validations/tempo.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts index 9a0df8bb..86bcf6d1 100644 --- a/src-migrate/validations/tempo.ts +++ b/src-migrate/validations/tempo.ts @@ -95,3 +95,15 @@ export const TempoSchemaPengiriman = z.object({ }), dokumenPengirimanInvoiceInput: z.string().optional(), }); +export const TempoSchemaSupplier = z.object({ + supplier: z.string().min(1, { message: 'Nama supplier harus diisi' }), + pic: z.string().min(1, { message: 'Nama PIC harus diisi' }), + telepon: z + .string() + .min(1, { message: 'Nomor telepon harus diisi' }) + .refine((val) => /^\d{10,12}$/.test(val), { + message: 'Format nomor telepon tidak valid, contoh: 081234567890', + }), + durasiTempo: z.string().min(1, { message: 'Durasi tempo harus diisi' }), + creditLimit: z.string().min(1, { message: 'Limit Kredit harus diisi' }), +}); |
