javascript - How to invalid 00/00/0000 date in JS -
i using jquery validation plugin. used this post validate dates using plugin. working there problem. accepting 00/00/0000 date well. how can invalid date modifying following function.
$.validator.addmethod( "australiandate", function(value, element) { return value.match(/^\d\d?\/\d\d?\/\d\d\d\d$/); }, "please enter date in format dd/mm/yyyy" );
maybe can try this, perhaps can works :)
function(value, element) { if (!value.match(/^00\/00\/0000$/)) return value; }
Comments
Post a Comment