Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6687233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:15:51+00:00 2026-05-26T05:15:51+00:00

Im working on an mvc3 application that will be deployed globally and have a

  • 0

Im working on an mvc3 application that will be deployed globally and have a question about phone numbers and validation.

I want to display a textbox that allows customers to insert their phone number correctly based on the machines settings.

I know I can apply all of my regex’s onto the model’s PhoneNumber field.

If a user is coming from the US vs the UK there are 2 different regexs to be used.

Lets say a US based user inserts an invalid phone number how can I tell the application only to validate the phone number using the US format based on the users culture not against the entire range of regex’s?

I dont want the user to be told that his/her phone number is not formatted in UK format as that means nothing to them.

Hope this makes sense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:15:52+00:00Added an answer on May 26, 2026 at 5:15 am

    There are a lot more than two regexes.

    For the UK alone there are are getting on for 10 or more different formats for telephone numbers and that doesn’t take into account the different ways people can (and do) group the digits as well.

    My answer to a different question shows the different formats.

    You’re best approach is probably to use other data on the form to try to validate the phone number rather than analysing the number itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a new Asp.Mvc3 application that will go line about the same
I am working on a MVC3 application that will be hosted on IIS7 with
I am working on an MVC3 web application. One of my requirements is that
I have lots of forms in my MVC3 application that require the user to
ASP.NET MVC3 newb here. I am working on a MVC3 intranet application that uses
I have an MVC3 application that I am implementing pjax into . Everything is
I have working application in asp.net MVC3. Today when I was working on it
I'm working on a MVC3 web application. I want a list of categories shown
I need to display a Treeview in my MVC3 application. There will be a
Im working on a big MVC3 web application and have an annoyance regarding the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.