Skip to main content

is_valid_phone

Function is_valid_phone 

Source
pub fn is_valid_phone(value: &str) -> bool
Expand description

Check if a string is a “reasonably formatted” phone number.

This is not a full E.164 validator. It is tuned to catch obvious bad input while allowing common human formats (spaces, parens, hyphens, dots).