if(!preg_match("~^(?:\\+98|0)9(\\d{9})$~",$params['phone'])){ setErrorAndRedirect("Phone in invalid!","auth.php?action=register"); }