From: Andy Allan Date: Wed, 27 Nov 2024 17:02:25 +0000 (+0000) Subject: Merge pull request #4316 from AntonKhorev/block-reason-max-length X-Git-Tag: live~83 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/c47a40c1db59f0d0f836fbcd1b876390befe796e?hp=fa7841acbf0c0702d0f0988cd999f6a259aaf587 Merge pull request #4316 from AntonKhorev/block-reason-max-length Set max length of block reason --- 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 }