Vote #72820
完了Version date field regex validation accepts invalid date
0%
説明
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.
journals
Why not try @User.current.time_zone.parse(effective_date_before_type_cast)@?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Fix committed in r10810 with slight changes, thanks.
--------------------------------------------------------------------------------
Merged in 2.1-stable.
--------------------------------------------------------------------------------
related_issues
relates,Closed,9394,Custom date field only validating on regex and not a valid date