Skip to content

Commit

Permalink
Merge pull request #4316 from AntonKhorev/block-reason-max-length
Browse files Browse the repository at this point in the history
Set max length of block reason
  • Loading branch information
gravitystorm authored Nov 27, 2024
2 parents fa7841a + 30caa3c commit c47a40c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit c47a40c

Please sign in to comment.