From 30caa3c09ee2108fa5ed77883e4d658d4b58d9af Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 25 Oct 2023 16:46:57 +0300 Subject: [PATCH] Set max length of block reason --- app/models/user_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user_block.rb b/app/models/user_block.rb index 9dd8d3138c..61235c418d 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 }