phone property
Phone Number regex
Must be started either with "0", "+", "+XX <X between 2 to 4 digit>", or "(+XX <X between 2 to 3 digit>)" It is possible to add whitespace separating digit with "+" or "(+XX)"
Examples:
- 05555555555
- +555 5555555555
- (+123) 5555555555
- (555) 5555555555
- +5555 5555555555
Implementation
static String phone =
r'^(0|\+|(\+[0-9]{2,4}|\(\+?[0-9]{2,4}\)) ?)([0-9]*|\d{2,4}-\d{2,4}(-\d{2,4})?)$';