Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern-based validations need a better UX approach #109

Open
vanch3d opened this issue Sep 14, 2023 · 1 comment
Open

Pattern-based validations need a better UX approach #109

vanch3d opened this issue Sep 14, 2023 · 1 comment
Assignees
Labels
analysis Requires offline research and consideration

Comments

@vanch3d
Copy link
Contributor

vanch3d commented Sep 14, 2023

Expected behaviour

The error message for the validation of a url field should tell humans what the error is about, not regex parser :-)

Actual behaviour

The standard error message for a pattern attribute of a JSONSchema string is literally transcribing the wronged regular expression. Which, in the case of a url`, can be long and unreadable, therefore unusable

Image

To Reproduce

Creating an HTTP adapter with an incorrect URL, like in #106

Details

  • consider the implication for both (or either) backend and frontend validation
  • human-readable (short?) statement would be better (suggestion, drop the printout of the regex)
  • in the frontend, consider using destructured validation to pinpoint errors and utilise field-associated error messages:
    • the domain xxx is not valid
    • the protocol httpxyz is not valid
@vanch3d vanch3d changed the title Pattern-based validation need a better UX approach Pattern-based validations need a better UX approach Sep 14, 2023
@vanch3d vanch3d added the analysis Requires offline research and consideration label Sep 15, 2023
@simon622 simon622 self-assigned this Sep 18, 2023
@simon622 simon622 added this to the 2023.6 milestone Sep 18, 2023
@simon622
Copy link
Collaborator

I will ensure that the HTTP adapter uses the URL format and the pattern is removed

@simon622 simon622 removed this from the 2023.6 milestone Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Requires offline research and consideration
Projects
None yet
Development

No branches or pull requests

2 participants