Properties
disabledWhileSubmitting
disabledWhileSubmitting: boolean
errors
errors: Partial<Record<DeepKeys<Values>, string>>
extraContext
extraContext: ExtraContext
initialValues
initialValues: Values
isSubmitting
isSubmitting: boolean
onSubmit
onSubmit: ((event: Pick<FormEvent<Element>, "preventDefault">) => Promise<void>)
Type declaration
-
- (event: Pick<FormEvent<Element>, "preventDefault">): Promise<void>
-
Parameters
-
event: Pick<FormEvent<Element>, "preventDefault">
Returns Promise<void>
runValidation
runValidation: ((arg: {
fieldName?: DeepKeys<Values>;
newValues?: Values;
}) => Promise<Partial<Record<DeepKeys<Values>, string>>>)
Type declaration
-
- (arg: {
fieldName?: DeepKeys<Values>;
newValues?: Values;
}): Promise<Partial<Record<DeepKeys<Values>, string>>>
-
Parameters
-
arg: {
fieldName?: DeepKeys<Values>;
newValues?: Values;
}
-
Optional
fieldName?: DeepKeys<Values>
-
Optional
newValues?: Values
Returns Promise<Partial<Record<DeepKeys<Values>, string>>>
setErrors
setErrors: ((errors: Partial<Record<DeepKeys<Values>, string>>) => void)
Type declaration
-
- (errors: Partial<Record<DeepKeys<Values>, string>>): void
-
Parameters
-
errors: Partial<Record<DeepKeys<Values>, string>>
Returns void
setFieldError
setFieldError: (<Name>(name: Name, error: undefined | string) => void)
Type declaration
-
- <Name>(name: Name, error: undefined | string): void
-
Parameters
-
name: Name
-
error: undefined | string
Returns void
setFieldTouched
setFieldTouched: (<Name>(name: Name, touched: boolean) => void)
Type declaration
-
- <Name>(name: Name, touched: boolean): void
-
Parameters
-
name: Name
-
touched: boolean
Returns void
setFieldValue
set
Field
Value
: (<Name>(name
: Name, value
: DeepIndex<Values, Name>, shouldValidate
?: boolean) => void)
Type declaration
-
- <Name>(name: Name, value: DeepIndex<Values, Name>, shouldValidate?: boolean): void
-
Parameters
-
name: Name
-
value: DeepIndex<Values, Name>
-
Optional
shouldValidate: boolean
Returns void
setValues
setValues: ((values: Values, shouldValidate?: boolean) => void)
Type declaration
-
- (values: Values, shouldValidate?: boolean): void
-
Parameters
-
values: Values
-
Optional
shouldValidate: boolean
Returns void
submitForm
submitForm: ((shouldValidate?: boolean) => Promise<void>)
Type declaration
-
- (shouldValidate?: boolean): Promise<void>
-
Parameters
-
Optional
shouldValidate: boolean
Returns Promise<void>
touchOnBlur
touchOnBlur: boolean
touchOnChange
touchOnChange: boolean
touchOnFocus
touchOnFocus: boolean
validateOnBlur
validateOnBlur: boolean
validateOnChange
validateOnChange: boolean
validateOnFocus
validateOnFocus: boolean
validateOnMount
validateOnMount: boolean
validateOnSubmit
validateOnSubmit: boolean
Submit the form via a form onSubmit event.
Throws