X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/96dfe22fb006ec421f6b0bf42ca71f365b1a1e95..c3bf919e3e8d20503c1ef39f87d674d1adf31553:/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