Skip to content

issuesOfStep ​

Gives the issues of a Valibot result that are on the fields placed in a step, in layout order.

ts
const issues = issuesOfStep(step, issues)

Parameters ​

  • step LayoutStep
  • issues readonly BaseIssue<unknown>[] | undefined: like those of Formisch's validate(form)

Explanation ​

A form is validated as a whole, so its issues are on the fields of every step. These are the ones that keep the user on this one. Each has the issue, the field it is on, and the field's Formisch path with the indexes from the issue.

Returns ​

StepIssue ​

  • StepIssue
    • issue BaseIssue<unknown>: Valibot's issue
    • field FieldNode: the field it is on
    • path FieldPath: the field's Formisch path, like ['lines', 0, 'product']

Functions ​

Guides ​