Skip to content

fix: remove +49 phone number format restriction#555

Open
nadavosa wants to merge 2 commits into
developfrom
fix/phone-number-validation
Open

fix: remove +49 phone number format restriction#555
nadavosa wants to merge 2 commits into
developfrom
fix/phone-number-validation

Conversation

@nadavosa
Copy link
Copy Markdown
Collaborator

Summary

  • Removes PHONE_NUMBER_REGEX (/^\+[0-9\s]+$/) validation from phone fields in all three contact detail forms: volunteer, opportunity, and agent
  • Phone fields now only require non-empty input — any format is accepted
  • Affects: volunteer profile contact details, opportunity contact details, agent contact details (mobile + landline)

Test plan

  • Volunteer contact details: enter a number without + prefix (e.g. 01234567) → saves without validation error
  • Opportunity contact details: same
  • Agent contact details (mobile + landline): same
  • Phone field still rejects empty string

🤖 Generated with Claude Code

nadavosa and others added 2 commits May 22, 2026 16:32
…il forms

Phone fields in volunteer, opportunity, and agent contact detail sections
required a leading '+' (PHONE_NUMBER_REGEX = /^\+[0-9\s]+$/). Accept any
non-empty string instead so coordinators can enter numbers in any format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace strict /^\+[0-9\s]+$/ with /^[+\d\s\-()/]+$/ so numbers like
0160 123 456 or (030) 123-456 are accepted, while letters and arbitrary
text are still rejected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ivannissimrch ivannissimrch self-requested a review May 25, 2026 16:11
Copy link
Copy Markdown
Collaborator

@ivannissimrch ivannissimrch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation change works correctly across all three forms. However, the error message strings still describe the OLD rules "must start with + and contain only digits and spaces," which no longer match the new regex; + is no longer required; parens, dashes, and slashes are now allowed.

Screencast.from.2026-05-25.12-14-39.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants