Created
June 6, 2014 02:45
-
-
Save luismr/75004e880c7736552b8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* fiz esta alteração para validar somente os números já valendo a regra de 2013 da ANATEL para o 9 digito */ | |
private function validateMobilePhoneNumber($phone) { | |
$exp_regular = '/^(0[1-2][1-9]9\d{8})|(0[3-9][1-9]\d{8})$/'; | |
$ret = preg_match($exp_regular, $phone); | |
if($ret === 1) { | |
return TRUE; | |
} else { | |
return FALSE; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment