Skip to content

Instantly share code, notes, and snippets.

View gist:75004e880c7736552b8f
/* 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;
You can’t perform that action at this time.