]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user_block.rb
Merge branch 'pull/5734'
[rails.git] / app / models / user_block.rb
index 9dd8d3138cefb11c887255371f01ec7b9bc2e939..f25bd47b87d768b9d0ed0f3867f7e4e5695e898b 100644 (file)
@@ -3,12 +3,12 @@
 # Table name: user_blocks
 #
 #  id             :integer          not null, primary key
-#  user_id        :bigint(8)        not null
-#  creator_id     :bigint(8)        not null
+#  user_id        :bigint           not null
+#  creator_id     :bigint           not null
 #  reason         :text             not null
 #  ends_at        :datetime         not null
 #  needs_view     :boolean          default(FALSE), not null
-#  revoker_id     :bigint(8)
+#  revoker_id     :bigint
 #  created_at     :datetime
 #  updated_at     :datetime
 #  reason_format  :enum             default("markdown"), not null
@@ -28,7 +28,7 @@
 
 class UserBlock < ApplicationRecord
   validate :moderator_permissions
-  validates :reason, :characters => true
+  validates :reason, :characters => true, :length => { :maximum => 10000 }
   validates :deactivates_at, :comparison => { :greater_than_or_equal_to => :ends_at }, :unless => -> { needs_view }
   validates :deactivates_at, :absence => true, :if => -> { needs_view }