This is what I have so far:
public static function ValidaFone($RegeEx)
{
$RegeEx = preg_match('/^[0-9]{9,11,13}$/',$RegeEx);
........code.....
}
This is what I have so far:
public static function ValidaFone($RegeEx)
{
$RegeEx = preg_match('/^[0-9]{9,11,13}$/',$RegeEx);
........code.....
}
Phone traces can only be present in specific positions, right?
/^([0-9]{5}(-| )?[0-9]{4})$/
This regex reads as follows:
You can refine the expression to not allow, for example, phone numbers beginning with zero, or to include more snippets as an area code.
To understand any regular expression in JS, I recommend the link site. You can put an expression there and the site explains the excerpts.