Have you considered pairing the above with unsafe_validate_unique/4 during the validation phase?
That way you can provide quicker feedback to users before they submit the form and then seeing that there is an issue with whatever you’re testing for uniqueness.
Standardizes your UX such that any obvious issues with the provided info always get immediate feedback, and the DB still has the final say on uniqueness to avoid race conditions.






















