phone static method

String? phone(
  1. String? value, {
  2. String? errorMessage,
})

Implementation

static String? phone(String? value, {String? errorMessage}) {
  return matchRegex(value, r'^\d{10}$', errorMessage: errorMessage ?? 'Invalid phone number');
}