Jonatas

fix phone number validator

... ... @@ -203,8 +203,10 @@ class GetUtils {
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$');
/// Checks if string is phone number.
static bool isPhoneNumber(String s) => hasMatch(s,
r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$');
static bool isPhoneNumber(String s) {
if (s == null || s.length > 16 || s.length < 9) return false;
return hasMatch(s, r'^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$');
}
/// Checks if string is DateTime (UTC or Iso8601).
static bool isDateTime(String s) =>
... ...