defaultRegex constant
String
const defaultRegex
Phone regex original source: https://github.com/agungnursatria/regexpattern
Must started by either, "0", "+", "+XX <X between 2 to 4 digit>", "(+XX <X between 2 to 3 digit>)"
Can add whitespace separating digit with "+" or "(+XX)"
Example: 05555555555, +555 5555555555, (+123) 5555555555, (555) 5555555555, +5555 5555555555
Implementation
static const defaultRegex =
r'^(0|\+|(\+[0-9]{2,4}|\(\+?[0-9]{2,4}\)) ?)([0-9]*|\d{2,4}-\d{2,4}(-\d{2,4})?)$';