isPhoneNumber method

bool isPhoneNumber()

kiểm tra string là số điện thoại

Implementation

bool isPhoneNumber() {
  if (this!.length > 16 || this!.length < 9) return false;
  return hasMatch(this, r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$');
}