Defect #12359
closed
Version date field regex validation accepts invalid date
Added by Róbert Ágoston almost 12 years ago.
Updated over 11 years ago.
Description
Version date field regexp validation accepts invalid dates like "2012-11-33". Stored value is nil and no validation errors.
I attached a proposed patch that fixes this bug.
Files
- Category set to Custom fields
Why not try User.current.time_zone.parse(effective_date_before_type_cast)
?
- Category changed from Custom fields to Roadmap
Etienne Massip wrote:
Why not try User.current.time_zone.parse(effective_date_before_type_cast)
?
I just read that "Redmine only supports YYYY-MM-DD format for entering dates".
I read that at #10560#note-2
A similar bug was fixed in r7779 with the same method.
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 2.1.3
- Resolution set to Fixed
Fix committed in r10810 with slight changes, thanks.
- Status changed from Resolved to Closed
Also available in: Atom
PDF