index.js
/**
* Verify if a given value is a valid phone number with or without a country code.
* The digits can be separated by spaces and area codes can be wrapped in parenthesis.
*
* @public
* @since 0.1.0
* @param {!String} value - The value to be validated. Must be a string to avoid losing digits if a number starts with 0.
* @return {Boolean}
*
* @example
* var isPhoneNumberValid = defy.tel('+44 (0)20 7684 8444');
*/
Verify if a given value is a valid phone number with or without a country code.
The digits can be separated by spaces and area codes can be wrapped in parenthesis.
Verify if a given value is a valid phone number with or without a country code . The digits can be separated by spaces and area codes can be wrapped in parenthesis .
function tel (value) {
  if (value.length > 20) {
    return false
  }
  return telRegEx.test(value)
}
function tel ( value ) { if ( value . length > 20 ) { return false } return telRegEx . test ( value ) }
Verify if a given value is a valid phone number with or without a country code.
Verify if a given value is a valid phone number with or without a country code .