phoneValidationWithCountryCodeAndPlus method

bool phoneValidationWithCountryCodeAndPlus(
  1. String phone
)

phone validation method, only 12 digits

Implementation

bool phoneValidationWithCountryCodeAndPlus(String phone) {
  final RegExp regex = RegExp(
    r'^\+[0-9]{12}$',
  );
  return regex.hasMatch(phone);
}