refactor(patient-contact): improve contact form components and validation
- Remove hardcoded contact limit and use prop instead - Add ButtonAction component to form exports - Enhance contact schema validation with better error messages - Refactor contact type select component to use doc-entry components - Improve form layout and consistency between contact and relative forms
This commit is contained in:
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
const PersonContactBaseSchema = z.object({
|
||||
contactType: z.string().min(1, 'Mohon pilih tipe kontak'),
|
||||
contactNumber: z.string().min(8, 'Nomor minimal 8 digit'),
|
||||
contactType: z.string({ required_error: 'Mohon pilih tipe kontak' }).min(1, 'Mohon pilih tipe kontak'),
|
||||
contactNumber: z.string({ required_error: 'Nomor kontak harus diisi' }).min(8, 'Nomor minimal 8 digit'),
|
||||
})
|
||||
|
||||
const PersonContactListSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user