Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Calling validation programmatically on form render doesn't show the error messages #4744

@psyspy1

Description

@psyspy1

Prerequisites

What theme are you using?

other

Version

5.x

Current Behavior

Based on the docs, I am calling validation during the form render. Instead of passing in a ref object, I pass in a function which calls the validate function.

When the form is rendered, the error messages are not displayed in the UI.

I added a bunch of logging. When the form is rendered, the validation function is called. The errors object in the form state has the expected errors. However, errorSchema and schemaValidationErrorSchema have a bunch of undefined.

errorSchema: 
    arguments: undefined
    schema: undefined

Expected Behavior

I would expect the validation error messages to be shown on the UI.

Steps To Reproduce

No response

Environment

Anything else?

Is there a callback that's called after the form initialization is done?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions