X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c771557b38a2f935ea79d113386c759636f4e31f..d9c6758ee6184692fd4219befe13adf6dfa6e32b:/app/models/diary_entry.rb?ds=inline diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index dd1f9882a..4b2058b9d 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -5,6 +5,8 @@ class DiaryEntry < ActiveRecord::Base :order => "diary_comments.id" validates_presence_of :title, :body + validates_length_of :title, :within => 1..255 + validates_length_of :language, :within => 2..3, :allow_nil => true validates_numericality_of :latitude, :allow_nil => true validates_numericality_of :longitude, :allow_nil => true validates_associated :user