X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5ed2cbce027175963312c34ed3bb00cde4f5a66f..f68ca9ebc223b276f53d3073367d7e3d8ed9e6c8:/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