sameer shaikh

sameer shaikh

  • NA
  • 177
  • 37.1k

Regular Expression for mobile number

Sep 19 2016 6:43 AM
Hi 
 
I have created a simple model,there is Mobile number property and i want to apply restriction on that.
I am using this (@"^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$") but problem is length of digit must 10 and foreign mobile number may not be 10 digit.
how to apply validation on mobile number, this will be for indian and also foreign user.
so please let me know which regular expression is better for to solve this problem.
 

Answers (8)