diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-03-07 16:31:30 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-03-07 16:31:30 +0700 |
| commit | f0914e957be3dd73b69388e028505c7ce1361e9e (patch) | |
| tree | 7d5c4c12478a7b0b4a417ef1512320b634d597d8 /src-migrate/validations | |
| parent | 91e98f591c65499d543e49188deb156e77fbd494 (diff) | |
<iman> update code
Diffstat (limited to 'src-migrate/validations')
| -rw-r--r-- | src-migrate/validations/tempo.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts index 469f351d..dad26c5a 100644 --- a/src-migrate/validations/tempo.ts +++ b/src-migrate/validations/tempo.ts @@ -75,6 +75,17 @@ export const TempoSchemaKontakPerson = z message: 'Email Finance tidak boleh sama dengan Email Purchasing', path: ['financeEmail'], } + ) + .refine( + (data) => + !data.direkturEmail || + (data.direkturEmail !== data.financeEmail && + data.direkturEmail !== data.purchasingEmail), + { + message: + 'Email Direktur tidak boleh sama dengan Email Finance atau Purchasing', + path: ['direkturEmail'], + } ); export const TempoSchemaPengiriman = z.object({ PICTittle: z.string().min(1, { message: 'Tittle harus dipilih' }), |
