Skip to content

Suggestion: Make form validation more consistent with the VS Code input box #508

Description

@a-stewart

The only example I have been able to find of input validation in VS Code already is in the Quick Input bar.

What do you think about updating the form validation styling to match that?

Image

In the above screenshot I have only updated the text-field, I'll update the others if you are happy with the concept.

The changes are:

  • For the input itself, only change the border colour, leave the input background as is.
  • Attach a message directly below the input field which includes the error message.

In this case "What's your favorite fruit?", is the existing styling, whereas "What's your email address?" is the proposed change.

We'd need to consider how this would look for radio buttons and checkboxes, but I think the general idea holds.

We could also put this behind a property, eg <vscode-textfield inline-validation> or something like that.


I'd also like to have some way to configure it to use :user-invalid instead (optionally) for less aggressive verification (this would also be behind a property).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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