Reference > Admin > Form
Form
Form primitives: Bind, Form, useForm, validation
- What is exported from
webiny/admin/form? - How to import and use each exported item?
Overview
This page documents everything exported from webiny/admin/form. Import any of the items below directly from this path in your Webiny extensions.
Components
Bind
Function — imported from webiny/admin/form
Form
Constant — imported from webiny/admin/form
UnsetOnUnmount
Constant — imported from webiny/admin/form
Validation
Class — imported from webiny/admin/form
Main class of Validation library. Exported as a singleton instance, it offers methods for sync/async data validation and overwriting or adding new validators.
@class Validation @example import { validation } from ‘@webiny/validation’;
// validation is a preconfigured instance of Validation class.
// From here you can either add new validators or use it as-is.
ValidationError
Class — imported from webiny/admin/form
This class is used by validators to throw an error when value validation fails.
Hooks
useBind
Constant — imported from webiny/admin/form
useBindPrefix
Function — imported from webiny/admin/form
useForm
Constant — imported from webiny/admin/form
useGenerateSlug
Function — imported from webiny/admin/form
This hook is designed to be used with the useForm hook.
When generateSlug is called, it will generate a slug using the from form field, and set it into the to form field.
@param form
@param from
@param to
Types
FormApi
Type — imported from webiny/admin/form
FormOnSubmit
Type — imported from webiny/admin/form
GenericFormData
Type — imported from webiny/admin/form
Other
validation
Constant — imported from webiny/admin/form