Jquery form validation on input type
问题 I currently have a form which changes dynamically. I'm using all text inputs but they all should only accept numbers. $("#result-form").validate({ rules: { .text: { required: true, digits: true } }, messages: { .text:{ required: " Please enter a score!", digits: " Please only enter numbers!" } }, submitHandler: function(form) { form.submit(); } }); Currently i try to validate using the above but that doesn't work. Any ideas? 回答1: You cannot do it like this... $("#result-form").validate({