mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Merge pull request #378 from R0m1k3/1.1
Update form validation to correctly handle numeric inputs
This commit is contained in:
2 files changed
+3
-3
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -68,10 +68,10 @@ interface Group {
|
||||
|
||||
// Schema for form validation
|
||||
const avoirSchema = z.object({
|
||||
supplierId: z.number().min(1, "Veuillez sélectionner un fournisseur"),
|
||||
groupId: z.number().min(1, "Veuillez sélectionner un magasin"),
|
||||
supplierId: z.coerce.number().min(1, "Veuillez sélectionner un fournisseur"),
|
||||
groupId: z.coerce.number().min(1, "Veuillez sélectionner un magasin"),
|
||||
invoiceReference: z.string().optional(),
|
||||
amount: z.number().optional(),
|
||||
amount: z.coerce.number().positive().optional(),
|
||||
comment: z.string().optional(),
|
||||
commercialProcessed: z.boolean().optional(),
|
||||
status: z.enum(["En attente de demande", "Demandé", "Reçu"]).optional(),
|
||||
|
||||
Reference in new issue
Block a user