I want this mobile number should be in a format: +911234567
(It should not have any space nor - inbetween numbers)
I'm using this code to validate Mobile Numbers;
if (!preg_match("/((\+63)|0)[.\- ]?9[0-9]{2}[.\- ]?[0-9]{3}[.\- ]?[0-9]{4}/Ui", $_POST['number'], $matches))
{
// Invalid Number
}
But the regex is throwing the error even if the number is valid. Please help!