Fix email validation not displaying in Collaborators modals#4838
Fix email validation not displaying in Collaborators modals#4838lmac-1 wants to merge 5 commits into
Conversation
- Set action: :validate on the changeset in the validate handler so used_input? surfaces errors correctly for embedded schema fields - Add phx-debounce="300" to the email input to avoid errors appearing on every keystroke - Use a friendlier error message for invalid email format Relates to #4765
Security Review ✅
|
|
Thanks @doc-han. I will take a look at the UI shift tomorrow and see if it's an easy fix to bundle into this PR. |
- Position validation error absolutely to prevent layout shift in both Add and Invite Collaborator modals - Fix Invite Collaborator not showing validation by adding missing changeset action and consistent error message - Add phx-debounce to email input in Invite Collaborator modal
|
Hiya @doc-han great spot re layout shift. I've fixed this as it was an easy win. Also I extended the validation fix to the "Invite Collaborators" modal. PR description is updated with new validation steps to test. Can you give this another test? Thank you. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4838 +/- ##
=====================================
Coverage 90.3% 90.3%
=====================================
Files 444 444
Lines 22607 22607
=====================================
+ Hits 20419 20425 +6
+ Misses 2188 2182 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@theroinaochieng added you as a reviewer here. I'm just waiting for Farhan to give it a second review (see previous comment) |
|
Thanks @doc-han ! @theroinaochieng not sure if you want to do a final QA review before merging? |




Description
#4765 revealed that validation messages for the email field were not showing in the Add Collaborator(s) modal and Invite Collaborator modal. This PR ensures the validation appears for invalid email addresses.
Validation steps
Add Collaborators
lucy@local- check that the validation message appears - it should appear shortly after you stop typingInvite Collaborators
Additional notes for the reviewer
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Pre-submission checklist
/reviewwith Claude Code)
(e.g.,
:owner,:admin,:editor,:viewer)