Return to Snippet

Revision: 15638
at July 12, 2009 12:28 by Shifter


Initial Code
function fnValidatePhone($mValue)
{
  $sPattern = '/^[\(]?[0-9]{3}[\)]?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/';
  return preg_match($sPattern, $mValue);
}

Initial URL

                                

Initial Description

                                

Initial Title
Validate North America Phone Number

Initial Tags
phone, number

Initial Language
PHP