Design comparison
Community feedback
- @dylan-dot-cPosted 8 months ago
Whats the correct number format bro???
Tried 6 times still can't get it...
Anyways I checked the code, saw you doing alot of manual validation and that's why things like regular expressions or regex exist. You don't have to know all patterns by heart just use a tool or chatGPT to find a regex for phone number, email and so on... check out my solution if you wanna I used regex for email
0@Aayush259Posted 8 months agoCorrect number format: +CCNNNNNNNNNNNN CC for country code, and N for actual number.
I am a pure beginner that's why I have used manual validation.
0@dylan-dot-cPosted 8 months ago@Aayush259 I see, but what about people who dont use your country code? mine is +1 NNN NNN NNNN
Well thats an idea for your next improvement... you can fix the validations
Marked as helpful1@Aayush259Posted 8 months agoIf the country code consists of only one number, then '0' can be used before that digit: +01NNNNNNNNNN.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord