validator-collection icon indicating copy to clipboard operation
validator-collection copied to clipboard

Support Phone Number Validation

Open insightindustry opened this issue 3 years ago • 0 comments

It would be helpful to extend the validator collection with a validators.phone_number() validator and checkers.is_phone_number() checker.

Key requirements around this validator would be to:

  • support the diverse phone number structures and styles that operate globally
  • support the ability to validate phone number structures to a specific country-style OR to validate them against all country-styles
  • support the optional "de-hydration" of phone numbers to reduce them to their numerical components only
  • support the optional "re-hydration" of phone numbers to add back in stylistic "sugar" (e.g. + for the country code, (...) for area codes, etc.

insightindustry avatar Jan 09 '21 02:01 insightindustry