Android Phone Number Check isTelNumAvailable(String telNum)

Here you can find the source of isTelNumAvailable(String telNum)

Description

is Tel Num Available

Declaration

public static boolean isTelNumAvailable(String telNum) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean isTelNumAvailable(String telNum) {
        boolean result = false;
        if (!isNullOrEmpty(telNum)
                && telNum.matches("^1[3458]{1}[0-9]{9}$")) {
            result = true;/*from  ww  w .  ja v  a  2  s  . com*/
        }
        return result;
    }

    public static boolean isNullOrEmpty(String input) {
        if (null == input || "".equals(input)) {
            return true;
        }
        return false;
    }
}

Related

  1. isPhoneNumber(String inputStr)
  2. isPhone(String phoneNumber)
  3. isPhoneNumber(final String phone)
  4. isMobile(String mobiles)
  5. isMobileNO(String phoneNum)
  6. isLegalPhoneNumber(String phoneNumber)
  7. checkPhone(String phone)