Bug Tracker

Opened 14 years ago

Closed 13 years ago

#4781 closed enhancement (invalid)

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:

Description

please consider this as a replacement for the dateISO validation. The new regular expression comes from here: http://regexlib.com/REDetails.aspx?regexp_id=2092 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);

}

Change History (2)

comment:1 Changed 13 years ago by dmethvin

Component: unfilledplugin
Owner: set to joern

comment:2 Changed 13 years ago by john

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.