Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php validate phone number

$phone = '000-0000-0000';

if(preg_match("/^[0-9]{3}-[0-9]{4}-[0-9]{4}$/", $phone)) {
  // $phone is valid
}
 
PREVIOUS NEXT
Tagged: #php #validate #phone #number
ADD COMMENT
Topic
Name
6+2 =