phone static method

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

Check if the value is a valid phone number.

Implementation

static String? phone(String? value, {String? message}) =>
    value == null || value.isEmpty || (validations.isNumeric(value) && value.length == 10) ? null : message ?? 'Please enter a valid phone number';