jQuery validator addmethod not working solved

jQuery validator add custom rule method not working or not called/fire. Example for using addMethod in jQuery validator plugin given below. Because of one small mistake addMethod not working properly and that is using input filed ID instead of name attribute.

Example code for jQuery validator addMethod.

HTML code:

<form name="myform" action="#" id="myform">
<input name="mynumber" id="mynumberId" value="" />
</form>

JS code:

//DEFINE addMethod
$.validator.addMethod('numLessTen', function(value, element) {
    return (parseInt(value) < 10);
}, 'Please enter number below 10 value.');

//ENABLE VALIDATION
//USE input name(mynumber) HERE NOT id(mynumberId)
$("#myform").validate({
    rules: {
        mynumber: {
            required: true,
            numLessTen: true
        }
    }
});