Skip to content

TextFields (and TextFormFields) should allow displaying error state without error text #54104

@rami-a

Description

@rami-a

Use case

There are occasions where multiple TextField (or more likely TextFormField) are used on a page and the UX could call for a custom error solution instead of each textfield displaying an error message. We want to maintain the validate logic that exists on the Form but allow the developer to decide whether each textfield should show its error text.

Proposal

Adding a new parameter to InputDecoration that tells TextFields they should not display their error text but still display any other error specific content (errorBorder, etc)

This would have to also work with the validate logic of TextFormField as well so that if a form is validated the error text can choose to not be displayed on each text field.

cc @justinmc
Similar to #52634

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions