jQuery form validation (CUSTOM VALIDATION)
Code Structure : $.validator.addMethod("field_name","function(value){}","Message"); jQuery Custom NID Validation : $.validator.addMethod("nid_valid",function(value){ if(value.length == 10 || value.length == 13 || value.length == 17){ return true; }else{ return false; } },"NID number length 10, 13, 17 is valid");