I am getting form fields for profile in my project. In that form field am getting mobile number of user.I need to validate the mobile number of user in form field.I can't validate the US mobile number.I didn't find any solution for the validation.So I need validation rules for United States mobile number.
Asked
Active
Viewed 359 times
0
-
1Possible duplicate of [A comprehensive regex for phone number validation](http://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation) – SilverCorvus Jan 09 '16 at 12:27
-
As per CurlyCorvus's comment, you might be better off including "regex" and "yii" tags. You should also make it clear whether you are looking for front-end or back-end validation... and whether you just need the regex or whether you need help implementing the regex. Showing some code generally helps too. – geoidesic Jan 09 '16 at 14:22