Skip to content

Show custom invalid field message tooltip #30

@James-Livesey

Description

@James-Livesey

Websites can use constraint validation to check the validity of form elements, and if those elements are invalid, then a message tooltip/bubble will be shown to indicate to the user that the field is invalid. Currently, the bubble that is a part of Chromium appears, but it would be nice to have a custom validity bubble that feels more integrated into gShell.

We can achieve this by checking for the "invalid" event and preventDefaulting it to prevent the bubble from appearing. We can then show our own custom tooltip by getting the validation message from event.target.validationMessage. We may want to provide a custom default, localised validation message (and not use the Chromium one) by checking if the validationMessage is generic (against a generic input) and then showing our own message if it is the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions