phoneNumber static method

bool phoneNumber(
  1. String value
)

Implementation

static bool phoneNumber(String value) {
  if (SilUtilsTools.stringIsEmpty(value)) return false;

  RegExp exp = RegExp(
      r'^((12[0-9])|(13[0-9])|(14[0-9])|(15[0-9])|(16[0-9])|(17[0-9])|(50[0-9])|(19[0-9]))\d{8}$');
  return exp.hasMatch(value);
}