tags:

views:

37

answers:

2

validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered.

A: 

this question is a duplicate (exact) http://stackoverflow.com/questions/2947462/validating-the-mobile-numbers/2947479#2947479

VoodooChild
+2  A: 

^(8\d{8}|[1-79]\d{9})$

VoodooChild
nice and simple answer
nvn