From: Anton Khorev Date: Wed, 25 Oct 2023 13:46:57 +0000 (+0300) Subject: Set max length of block reason X-Git-Tag: live~4^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/30caa3c09ee2108fa5ed77883e4d658d4b58d9af?hp=-c Set max length of block reason --- 30caa3c09ee2108fa5ed77883e4d658d4b58d9af diff --git a/app/models/user_block.rb b/app/models/user_block.rb index 9dd8d3138..61235c418 100644 --- a/app/models/user_block.rb +++ b/app/models/user_block.rb @@ -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 }