有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (2) 个答案

  1. # 1 楼答案

    将此依赖项添加到pom中。xml

    <!  https://mvnrepository.com/artifact/com.googlecode.libphonenumber/libphonenumber  >
    <dependency>
        <groupId>com.googlecode.libphonenumber</groupId>
        <artifactId>libphonenumber</artifactId>
        <version>8.4.3</version>
    </dependency>
    
  2. # 2 楼答案

    你可以尝试使用谷歌的电话号码库。它包含isValidNumber函数,该函数提供“使用长度和前缀信息对某个地区的电话号码进行完整验证”。 https://github.com/googlei18n/libphonenumber