Validate Mobile number with the country code

前端 未结 2 1618
攒了一身酷
攒了一身酷 2020-12-22 00:49

I want to validate the mobile number user enters. I have two edit texts one for the code i.e. +91,0 etc and another for the phone number.

I have a question that how

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 01:12

    Try to use isGlobalPhoneNumber() method of PhoneNumberUtils to detect whether a number is valid phone number or not.

提交回复
热议问题