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