Showing
1 changed file
with
1 additions
and
1 deletions
@@ -204,7 +204,7 @@ class GetUtils { | @@ -204,7 +204,7 @@ class GetUtils { | ||
204 | 204 | ||
205 | /// Checks if string is phone number. | 205 | /// Checks if string is phone number. |
206 | static bool isPhoneNumber(String s) => hasMatch(s, | 206 | static bool isPhoneNumber(String s) => hasMatch(s, |
207 | - r'^(0|\+|(\+[0-9]{2,4}|\(\+?[0-9]{2,4}\)) ?)([0-9]*|\d{2,4}-\d{2,4}(-\d{2,4})?)$'); | 207 | + r'([0-9\s\-]{7,})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$'); |
208 | 208 | ||
209 | /// Checks if string is DateTime (UTC or Iso8601). | 209 | /// Checks if string is DateTime (UTC or Iso8601). |
210 | static bool isDateTime(String s) => | 210 | static bool isDateTime(String s) => |
-
Please register or login to post a comment