validate method

bool validate({
  1. PhoneNumberType? type,
})

validates a phone number by first checking its length then pattern matching

Implementation

bool validate({PhoneNumberType? type}) =>
    Validator.validateWithPattern(this, type);