fix: remove +49 phone number format restriction#555
Open
nadavosa wants to merge 2 commits into
Open
Conversation
…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>
Collaborator
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PHONE_NUMBER_REGEX(/^\+[0-9\s]+$/) validation from phone fields in all three contact detail forms: volunteer, opportunity, and agentTest plan
+prefix (e.g.01234567) → saves without validation error🤖 Generated with Claude Code