X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/96dfe22fb006ec421f6b0bf42ca71f365b1a1e95..5dcd2ad70c5006d1b33838274b9a9167c81cfc90:/app/models/node_tag.rb diff --git a/app/models/node_tag.rb b/app/models/node_tag.rb index 6b21e4b01..494260112 100644 --- a/app/models/node_tag.rb +++ b/app/models/node_tag.rb @@ -5,4 +5,6 @@ class NodeTag < ActiveRecord::Base 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