[go: up one dir, main page]

Skip to content

Improve when & how validation errors appear in the "Add Approvers" interface

The "Add Approvers" interface has some issues around the name validation.

Right now, it requires a full server round-trip to submit the form before an error appears indicating that the name for the rule is already taken.

While reviewing the plan for #32306 (closed), some potential solutions were raised:

  • By @pedroms: We don't even need to restrict this by duplicate names, it's weird but not incorrect to have duplicates
  • By @kerrizor: We could provide the list of known names ahead of time so this doesn't require a submission attempt to determine that the name is a duplicate

These options are summarized in this comment (as status options #​2 and #​3).

These options are mutually exclusive: If we remove the validation constraint entirely, it obviates the need for the list of existing names. If we provide the list of names for early failure, we're obviously not going to remove the validation error.

The one exception is if we want to indicate to the user that the name is already taken but not cause that to be a validation error, which might be a nice UX path (the user knows it's a duplicate, but can still submit it anyway).

This issue is to discuss these options and decide on a path forward for iterating on this modal validation.

Edited by Thomas Randolph