@@ -30,7 +30,7 class CustomField < ActiveRecord::Base | |||
|
30 | 30 | }.freeze |
|
31 | 31 | |
|
32 | 32 | validates_presence_of :name, :field_format |
|
33 | validates_uniqueness_of :name | |
|
33 | validates_uniqueness_of :name, :scope => :type | |
|
34 | 34 | validates_length_of :name, :maximum => 30 |
|
35 | 35 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i |
|
36 | 36 | validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys |
General Comments 0
You need to be logged in to leave comments.
Login now