Commit 16310190 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Allow same name for custom fields on different object types.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1730 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 16509203
......@@ -30,7 +30,7 @@ class CustomField < ActiveRecord::Base
}.freeze
validates_presence_of :name, :field_format
validates_uniqueness_of :name
validates_uniqueness_of :name, :scope => :type
validates_length_of :name, :maximum => 30
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment