UseJsonFormOptions
The options of useJsonForm.
Definition
UseJsonFormOptionsbuilderSchemaBuilder: optional, builds the schema and knows your own types and rules. Defaults tocreateSchemaBuilder()componentsFieldComponents: optional, your component for each field typelayoutComponentsLayoutComponents: optional, your component for each layout typevalidateValidationMode: optional, when a field is validated the first time, as in FormischrevalidateExclude<ValidationMode, 'initial'>: optional, when it is validated again, as in Formisch
Example
ts
const jsonForm = useJsonForm(definition, {
// Your own types, rules, messages and extensions. Defaults to createSchemaBuilder().
builder: createSchemaBuilder({ extensions: [affects()] }),
// Your component for each field type.
components,
// Your component for each layout type.
layoutComponents: { section: LayoutSection, row: LayoutRow },
// When a field is validated the first time, and again after that, as in Formisch.
validate: 'blur',
revalidate: 'input',
})