Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Interface: IFormData

@react-form-builder/core.IFormData

The interface for accessing the form data.

Implemented by

Properties

clear

clear: () => void

Type declaration

▸ (): void

Clears the form data.

Returns

void


getValidationResult

getValidationResult: () => Promise<ValidationMessages>

Type declaration

▸ (): Promise<ValidationMessages>

Returns the validation results without triggering an events and changing the state of the form.

Returns

Promise<ValidationMessages>

the ValidationMessages validation results.


reset

reset: () => void

Type declaration

▸ (): void

Sets the form to its default value.

Returns

void


setAllErrors

setAllErrors: (message?: string) => void

Type declaration

▸ (message?): void

Sets the validation error message for all form data fields.

Parameters
NameTypeDescription
message?stringthe validation error message.
Returns

void


validate

validate: () => Promise<void>

Type declaration

▸ (): Promise<void>

Validates the data in the form.

Returns

Promise<void>

Accessors

data

get data(): Record<string, unknown>

Returns

Record<string, unknown>

the Record with all the form data.


errors

get errors(): Record<string, unknown>

Returns

Record<string, unknown>

the Record with all validation error messages.


hasErrors

get hasErrors(): boolean

true if the form contains errors, otherwise false.

Returns

boolean


isValidating

get isValidating(): boolean

If true, then validation is in progress.

Returns

boolean


state

get state(): Record<string, unknown>

Returns

Record<string, unknown>

A user-defined key-value observable storage. Utilize it to store and share any custom data.