validate static method
Validates a phone number using pattern mathing
if a type
is added, will validate against a specific type
Implementation
@internal
static bool validate(PhoneNumber phoneNumber, [PhoneNumberType? type]) {
return Validator.validateWithPattern(phoneNumber, type);
}