title: How to validate 8 to 10 digit long phone number?
body: <p>In my android application, phone number field used. 8 to 10 digit input value given by the user. How to validate  8 to 10 digit phone number using PHONE_REGEX? </p>
  
  <p>I have already tried this method,</p>
  
  <pre><code>private static final String PHONE_REGEX = "\\d{8-10}";
  
    public static boolean isPhoneNumber(EditText editText, boolean required) {
      return isValid(editText, PHONE_REGEX, PHONE_MSG, required);
  }
  </code></pre>