X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5ed2cbce027175963312c34ed3bb00cde4f5a66f..7bf44e6870ba3448080a5453a43799562174ae48:/app/models/changeset_tag.rb diff --git a/app/models/changeset_tag.rb b/app/models/changeset_tag.rb index 6298fbe77..6a414a0fc 100644 --- a/app/models/changeset_tag.rb +++ b/app/models/changeset_tag.rb @@ -1,5 +1,8 @@ class ChangesetTag < ActiveRecord::Base - belongs_to :changeset, :foreign_key => 'id' + validates_presence_of :id + validates_length_of :k, :v, :maximum => 255, :allow_blank => true + validates_uniqueness_of :id, :scope => :k + validates_numericality_of :id, :only_integer => true end