Format date dd.mm.yyyy for input text with jQuery Validation addMethod
问题 I am having real trouble with this addMethod for validating a date from an input. It doesn't test the regex properly and i think it may be written with errors. The date should be in this format: dd.mm.yyyy . Please help... $(function() { $(".msgBtn").click(function() { var isValid = true; if (!$("#startDate").valid()) { isValid = false; } if (!$("#endDate").valid()) { isValid = false; } if (!isValid) return; $("form#csr-message").submit(); //save button }); }); $.validator.addMethod(