Skip to content

Fix email validation not displaying in Add Collaborators modal#4838

Open
lmac-1 wants to merge 3 commits into
mainfrom
fix/collaborator-email-validation-display
Open

Fix email validation not displaying in Add Collaborators modal#4838
lmac-1 wants to merge 3 commits into
mainfrom
fix/collaborator-email-validation-display

Conversation

@lmac-1
Copy link
Copy Markdown
Collaborator

@lmac-1 lmac-1 commented Jun 5, 2026

Description

#4765 revealed that validation messages for the email field were not showing in the Add Collaborator(s) modal. This PR ensures the validation appears for invalid email addresses.

Validation steps

  1. Add a collaborator to a workflow
  2. Type an invalid email address, for example lucy@local - check that the validation message appears - it should appear shortly after you stop typing
  3. Update to valid email address
  4. Validation message should disappear after same delay

Additional notes for the reviewer

  1. Validation message will appear 300ms after user stops typing. This is in line with other areas on the project.
  2. Email validation tidying up will be addressed in a follow up PR which will close Collaborator add form silently rejects emails accepted by user registration #4765

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

- 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
@github-project-automation github-project-automation Bot moved this to New Issues in Core Jun 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Security Review ✅

  • S0 (project scoping): N/A — changes only adjust client-side validation feedback (error message text, debounce, changeset :action) in the Add Collaborators modal; no new queries or data access introduced.
  • S1 (authorization): N/A — no new web-layer actions; the existing validate and add_collaborators handlers are unchanged in their authorization surface.
  • S2 (audit trail): N/A — no Repo.insert/update/delete or config-resource writes added.

@lmac-1 lmac-1 requested review from doc-han and josephjclark June 5, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

Collaborator add form silently rejects emails accepted by user registration

1 participant