aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/static/new/packages/ValidationPlugin/src/additional/time.js
blob: 963bdb9b96b8d764d798ec369e3a18a3ea138df6 (about) (plain)
1
2
3
$.validator.addMethod("time", function(value, element) {
	return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
}, "Please enter a valid time, between 00:00 and 23:59");