Skip to content

Add AutoValidateMode.delayed #178061

@cedvdb

Description

@cedvdb

Use case

The current values for AutoValidateMode all suffer from the fact that the user is presented an error message when he hasn't done anything wrong:

  • on user interaction: if the user starts typing in a textfield that requires minimum 10 characters, displaying the error as soon as he types is questionable UX
  • on unfocus: if the user refocus the field and correct his mistake, the error message is still shown, since there is no unfocus event.

Ultimately it's not possible to show an error message when the user is "done" because we don't know when that's the case. However we can approximate it with a delay.

Proposal

My proposal is to add AutoValidateMode.delayed, so that validation happens after a delay after the last user change.

Non Proposal

Custom validation mode / user defined validation modes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: 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 Flutterframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions