Skip to content

Commit 3a17ad3

Browse files
nschonnijzaefferer
authored andcommitted
Split out time
1 parent 25724a7 commit 3a17ad3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/additional/additional.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333

3434
}());
3535

36-
jQuery.validator.addMethod("time", function(value, element) {
37-
return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);
38-
}, "Please enter a valid time, between 00:00 and 23:59");
3936
jQuery.validator.addMethod("time12h", function(value, element) {
4037
return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
4138
}, "Please enter a valid time in 12-hour am/pm format");

src/additional/time.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
jQuery.validator.addMethod("time", function(value, element) {
2+
return this.optional(element) || /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(value);
3+
}, "Please enter a valid time, between 00:00 and 23:59");

0 commit comments

Comments
 (0)