Interface ISchemaFormProps<TFieldValues>

Interface representing the properties of the form schema.

interface ISchemaFormProps<TFieldValues> {
    criteriaMode?: CriteriaMode;
    defaultValues?: AsyncDefaultValues<TFieldValues> | DefaultValues<TFieldValues>;
    devTools?: boolean;
    enableConditionalRendering?: boolean;
    enableValidations?: boolean;
    formClassName?: string;
    formDescription?: string;
    formDisabled?: boolean;
    formLabel: string;
    formSlug: string;
    formStyle?: CSSProperties;
    onChange?: FormChangeHandler<TFieldValues>;
    onInvalidSubmit?: SubmitErrorHandler<TFieldValues>;
    onSubmit?: FormSubmitHandler<TFieldValues>;
    persistFormResponse?: "localStorage" | "sessionStorage";
    reValidateMode?: ReValidateMode;
    schema: IFieldSchema<TFieldValues>[];
    showValidationErrors?: boolean;
    validationMode?: ValidationMode;
}

Type Parameters

  • TFieldValues extends FieldValues

    The type of field values.

Properties

criteriaMode?: CriteriaMode

Criteria mode for validation.

defaultValues?: AsyncDefaultValues<TFieldValues> | DefaultValues<TFieldValues>

Default values for the form fields.

devTools?: boolean

Whether to enable developer tools for form debugging.

enableConditionalRendering?: boolean

Whether to enable conditional rendering of fields.

enableValidations?: boolean

Whether to enable validations.

formClassName?: string

CSS class name for the form.

formDescription?: string

A brief description of the form.

formDisabled?: boolean

Whether the form is disabled.

formLabel: string

The label or title of the form.

formSlug: string

The unique identifier for the form.

formStyle?: CSSProperties

CSS styles for the form.

Callback for handling form changes.

onInvalidSubmit?: SubmitErrorHandler<TFieldValues>

Callback for handling invalid form submissions. Supports both normal and async functions.

Callback for form submission. Supports both normal and async functions.

persistFormResponse?: "localStorage" | "sessionStorage"

Where to persist form responses (e.g., localStorage, sessionStorage).

reValidateMode?: ReValidateMode

Re-validation mode (when re-validations are triggered).

The schema defining the fields in the form.

showValidationErrors?: boolean

Whether to show validation errors.

validationMode?: ValidationMode

Validation mode (when validations are triggered).