Phone or email validation in one field is not working

Phone or email validation in one field is not working

Below is my js code. Inside console.log return correct value but at the time of enter phone number still asking valid email address:



<script type="text/javascript">
$(document).ready(function() {
      $("#rform").validate({
rules: {
email: {
required: true,
email: function(element){
//console.log(isNaN($("#email").val()));
return isNaN($("#email").val());
}
},
pass: "required",
},
messages: {
email: {
required: "Please enter your email Id or phone number",
email: "Please enter a valid email address"
},
pass: "Please enter a password"
}

});
});
</script>


<form  action="" method="post" id="rform" name="rform">
          <label>Please Enter Your Email Id or Phone No.</label>
          <input name="email" id="email" type="text" >
          <label>Password</label>
          <input name="pass" id="pass"  type="password">
          <input class="submitbtn" name="Submit" value="Login" type="submit">
        </form>