]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node_tag.rb
Adding validations for the length of node tags, and the presence of the id (and versi...
[rails.git] / app / models / old_node_tag.rb
index 26a6c92b490f52220ce1b60f068a4b800b2071b5..ef32a0613f3a9aa08df97d9b13d809c4a6f509a5 100644 (file)
@@ -3,5 +3,7 @@ class OldNodeTag < ActiveRecord::Base
 
   set_table_name 'node_tags'
 
+  validates_presence_of :id, :version
+  validates_length_of :k, :v, :within => 0..255, :allow_blank => true
 
 end