app/models/unidom/dictionary/dictionary_item.rb in unidom-dictionary-0.1 vs app/models/unidom/dictionary/dictionary_item.rb in unidom-dictionary-0.2
- old
+ new
@@ -4,8 +4,9 @@
self.table_name = 'unidom_dictionary_items'
include Unidom::Common::Concerns::ModelExtension
- validates :value, presence: true, length: { in: 2..self.columns_hash['value'].limit }
+ validates :code, allow_blank: true, length: { in: 1..self.columns_hash['code'].limit }
+ validates :value, presence: true, length: { in: 2..self.columns_hash['value'].limit }
end