Modular Forms is in maintenance mode. We recommend Formisch, its official successor, for new projects.

required

Creates a validation function that checks the existence of an input.

const validate = required(error);

Parameter

  • error string

Return

  • validate (value: FieldValue | number[]) => string