A case for *validating* uniqueness

@michalmuskala

If I understand you correctly, what you’re describing is:

  1. User fills the form
  2. Frontend makes an AJAX request specifically to check for uniqueness, and may set an error accordingly
  3. When frontend says the form is valid, it sends the data to the backend,
  4. Backend does not bother checking uniqueness in the validation step because that’s already been done, but does react as usual if there’s a constraint violation

That makes sense to me. It’s the same principle, carried further; the user typically can correct a uniqueness issue even before submitting the form.

2 Likes