1
lxl
2022-09-16 cb746cca26fa024018d7ce772ba6a96557ea768b
1
2
3
$.validator.addMethod("time12h", function(value, element) {
    return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
}, "Please enter a valid time in 12-hour am/pm format");