Project

General

Profile

Actions

Defect #10560

closed

strange validation in redmine core

Added by ilya boltnev over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

I've developing redmine plugin, and discover this line of code in Version model:

validates_format_of :effective_date, :with => /^\d{4}-\d{2}-\d{2}$/, :message => :not_a_date, :allow_nil => true

I've changed Rails date format by adding

Date::DATE_FORMATS[:default]="%d.%m.%Y"

in initializer, and now I can't save my Version.

Two questions to developers:

1.Why do we need for this line? Are we need to validate effective_date of version so hard?

2.What should I do to solve this problem? I need my date format

environment: ruby Entrprise Edition, rails 2.3.14, mysql 5.1,svn 1.6


Related issues

Related to Redmine - Defect #668: Date input fields don't respect date format settingsNewJean-Philippe Lang2008-02-15

Actions
Actions

Also available in: Atom PDF