summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-16 17:16:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-16 17:16:49 +0000
commitfcefdb22bfc3a270e213e289c562bea0bd8722ef (patch)
tree17b14373e732950cc918883df746e89a33d1373d /app/models/custom_field.rb
parent7363428703e4a86c3c7b20e5adc00e9ae9428b2e (diff)
downloadredmine-fcefdb22bfc3a270e213e289c562bea0bd8722ef.tar.gz
redmine-fcefdb22bfc3a270e213e289c562bea0bd8722ef.zip
Added several validates_length_of
git-svn-id: http://redmine.rubyforge.org/svn/trunk@593 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 554504a9f..751cc8526 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -29,6 +29,7 @@ class CustomField < ActiveRecord::Base
validates_presence_of :name, :field_format
validates_uniqueness_of :name
+ validates_length_of :name, :maximum => 30
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys