Problem with isNumeric validation with my form. $.isNumeric($('input#director').val()) does not work. I want to check if the input value is only a string, and if the user entered numbers by mistake, the label error will appear. but problem is, it is not working.
$(function() {
$('.error').hide();
$(".submit").click(function() {
$('.error').hide();
var director = $("input#director").val();
if(director=="" || ($.isNumeric($('input#director').val()))){
$("label#director_error").show();
$("input#director").focus();
return false;
}
}
}
$('input#director').val()when you already put it in the variabledirector?