I am unable to write the exact pattern for 10 digit mobile number (as 1234567890 format) in PHP . email validation is working.
here is the 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);
}