unkeyed / unkey

Open source API management platform
https://go.unkey.com
Other
4.04k stars 470 forks source link

Ratelimit's `New Override` form displays repeated form errors #2393

Open unrenamed opened 1 week ago

unrenamed commented 1 week ago

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

When filling out the "New Override" form for the Ratelimit feature, users experience repeated form errors appearing both under the relevant input fields and in the same block as the "Create" button. If multiple errors occur, the second error message rewrites, showing only the last invalid input. Additionally, there is an issue with font size and weight inconsistency for the error messages.

The question is whether this is expected behaviour?

Steps to Reproduce

  1. Navigate to the ratelimit's page and select the "Overrides" tab
  2. Fill out the required fields with valid input
  3. Click the "Create" button (this will activate the form validation)
  4. Now, put an empty string to any of the form inputs
  5. Notice the error messages displayed twice: under the actual input and another one below
  6. See how the error message styles differ, noting inconsistencies in font size and weight

Expected behavior

The expected behaviour must be approved with the repo owners first. Here are my suggestions:

  1. Instead of overwriting, show all errors related to multiple invalid fields individually and clearly under their respective fields.
  2. If repeated errors are intended, standardize the font size and weight for error messages to ensure a consistent appearance across the form.

Other information

No response

Screenshots

image

Version info

- OS:
- Node:
- npm:
linear[bot] commented 1 week ago

ENG-1453 Ratelimit's `New Override` form displays repeated form errors

Mauseiroko commented 3 days ago

/assign

oss-gg[bot] commented 3 days ago

This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest

Mauseiroko commented 3 days ago

please can you assign it to me