For numaric validation use ^(?=.*[0-9]) in jquery.
If you want to set numaric validation in your jquery validation then you need to follow below example code.
<script> var penName=$('pen_name').val(); // pen_name is the input text ID name, and penName is the user define variable, you can change this variable name. var numeric_filter=/^(?=.*[0-9])/; // numeric_filter is the user define variable, here store numaric filter data. if( !numeric_filter.test(penName)){ $('#PenErr').text('*Enter at least 1 numeric value.'); // PenErr id name of a div/span/p tag ID name where you display "*Enter at least 1 numeric value." this message. $('#pen_name').focus(); return false; } </script>
Question and answer is powered by AnsPress.io