Skip to content

AffectsExtension ​

The extension affects() gives. It is a SchemaExtension, typed with the key it adds, so defineForm() types affects on fields, steps, sections and display elements.

ts
interface AffectsExtension extends SchemaExtension {
  readonly fieldProps: AffectsPropsSchema
  readonly layoutProps: AffectsPropsSchema
}

AffectsPropsSchema ​

The Valibot schema of the key the package adds: an optional affects, a list of Affects.

ts
type AffectsPropsSchema = ObjectSchema<
  {
    readonly affects: OptionalSchema<
      ArraySchema<LazySchema<GenericSchema<Affect>>>
    >
  },
  undefined
>

Guides ​

Functions ​