##// END OF EJS Templates
Allow same name for custom fields on different object types....
Jean-Philippe Lang -
r1729:163101902608
parent child
Show More
@@ -30,7 +30,7 class CustomField < ActiveRecord::Base
30 }.freeze
30 }.freeze
31
31
32 validates_presence_of :name, :field_format
32 validates_presence_of :name, :field_format
33 validates_uniqueness_of :name
33 validates_uniqueness_of :name, :scope => :type
34 validates_length_of :name, :maximum => 30
34 validates_length_of :name, :maximum => 30
35 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
35 validates_format_of :name, :with => /^[\w\s\'\-]*$/i
36 validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
36 validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
General Comments 0
You need to be logged in to leave comments. Login now