I am unable to accurately write the 10-digit mobile number pattern in PHP (1234567890 formats). Email verification is operational.
My code:
function validate_email($email)
{
return eregi("^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z] {2,6}$", $email);
}
function validate_mobile($mobile)
{
return eregi("/^[0-9]*$/", $mobile);
}
Can someone please help me with this?