How to validate a (country specific) phone number

前端 未结 8 629
一个人的身影
一个人的身影 2020-12-30 00:44

A valid phone number contains:

  • Less than 9 characters
  • A "+" at the start
  • Only digits.

I\'m trying to use regular expre

8条回答
  •  生来不讨喜
    2020-12-30 01:02

    Your regex should look like this, you need information about char counter

    @"^(\+[0-9]{9})$"
    

提交回复
热议问题