Skip to content

Fix Zod schema error when "Bank" is selected but PayPal is still required Description: #10

@Izume01

Description

@Izume01

When the user selects "Bank" as the payment method, the form still validates as if "PayPal" details are required. This causes a Zod validation error, even though PayPal shouldn't be needed in that case.

Steps to Reproduce:

Select "Bank" in the payment method dropdown.

Leave PayPal-related fields empty.

Try to submit the form.

Expected Behavior:

PayPal fields should not be required when "Bank" is selected.

Suggested Fix:

Add conditional logic inside the invoiceSchema to validate only the selected payment method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions