From 86864fab5b89445e988fb7fd08205d5afa94354b Mon Sep 17 00:00:00 2001 From: Ben Rexin Date: Thu, 15 Aug 2024 22:00:23 +0200 Subject: [PATCH] fix: [#798] validate Topic.name length --- app/models/topic.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/topic.rb b/app/models/topic.rb index 4749049df..1f47bcc79 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -8,6 +8,7 @@ class Topic < ApplicationRecord PROPOSAL_TYPES = %w[proposal enquiry].freeze validates :user, :name, :description, :label, presence: true validates :proposal_type, inclusion: { in: PROPOSAL_TYPES } + validates :name, length: { maximum: 255 } belongs_to :user belongs_to :event, optional: true