following is my piece of code which checks if the input format is EMAIL which comes from the form input or not and validates accordingly i want to know how can i modify the following code that validates if the input was only number
if(email.length == 0 || email.indexOf('@') == '-1'){ var error = true; $('#email_error').fadeIn(500); }else{ $('#email_error').fadeOut(500); }