Skip to content

TextField.ErrorMessage doesnt render children #584

@MaksimPrudnikau

Description

@MaksimPrudnikau

Describe the bug
The TextField.ErrorMessage component does not render its children content when used within a form. Instead, the error message remains invisible or empty, even when validation fails and the error state is active.

To Reproduce
Steps to reproduce the behavior:

  1. Create a form with a TextField that has validation (e.g., required field).
  2. Wrap an error message inside TextField.ErrorMessage.
  3. Trigger validation (e.g., submit the form with an empty field).
  4. Observe that the error message does not appear, even though the field is in an error state.

Expected behavior
When validation fails, TextField.ErrorMessage should render its children (e.g., "This field is required") and display the error message near the input field.

Screenshots

Image

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.3.2
  • Firefox
  • 138.0b3

Additional context
The error state is correctly triggered, but the message itself does not render. Replacing TextField.ErrorMessage with a plain <div> renders the error text correctly, confirming that the issue is specific to the ErrorMessage component's implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions