#1050: Fix #1043 - Phone Number Parsing Error
Issue #1050 by RaviSadam
Fix #1043 - Phone Number Parsing Error
Pull Request Details
Description
This pull request addresses issue #1043, which involves a parse exception occurring when users input phone numbers with a country code.
- Validation Enhancement: Updated the phone number validation logic to correctly handle and parse phone numbers that include a country code.
- Regex Update: Added the regex pattern to accept and properly format phone numbers with country codes.
Type of PR
- [] Bug fix
Files Modified
1. User.js: Updated the phoneNumber field in stringToggleSchema to handle phone numbers with country codes.
2. userUpdateController.js: Added phone number regex and validation logic to ensure proper formatting and handling of country codes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
- New Features
- Improved phone number validation when updating user profiles to ensure accuracy and compliance with standard formats.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 Replies