validatePhoneNo function

bool validatePhoneNo(
  1. String? phoneNo
)

Implementation

bool validatePhoneNo(String? phoneNo) {
  if (phoneNo == null) return false;
  final regExp = RegExp(r'(^(?:[+0])?[0-9\-])');
  return !regExp.hasMatch(phoneNo);
}