Skip to main content

Bug Tracker

Side navigation

#4781 closed enhancement (invalid)

Opened June 17, 2009 11:44PM UTC

Closed February 05, 2010 08:32PM UTC

new validate method

Reported by: mikeybates Owned by: joern
Priority: major Milestone: 1.4
Component: plugin Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

please consider this as a replacement for the dateISO validation. The new regular expression comes from here:

and checks for ISO date format. The old method would allow things like 2009-31-31 and 2009-02-31

dateISO: function(value, element) {

return this.optional(element) || /^(\\d{4}(?:(?:(?:\\-)?(?:00[1-9]|0[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-6]))?|(?:(?:\\-)?(?:1[0-2]|0[1-9]))?|(?:(?:\\-)?(?:1[0-2]|0[1-9])(?:\\-)?(?:0[1-9]|[12][0-9]|3[01]))?|(?:(?:\\-)?W(?:0[1-9]|[1-4][0-9]5[0-3]))?|(?:(?:\\-)?W(?:0[1-9]|[1-4][0-9]5[0-3])(?:\\-)?[1-7])?)?)$/.test(value);


Attachments (0)
Change History (2)

Changed October 13, 2009 01:14AM UTC by dmethvin comment:1

component: unfilledplugin
owner: → joern

Changed February 05, 2010 08:32PM UTC by john comment:2

resolution: → invalid
status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.