diff --git a/app/models/community_news.rb b/app/models/community_news.rb index 9a36458b6..a803d0286 100644 --- a/app/models/community_news.rb +++ b/app/models/community_news.rb @@ -13,7 +13,7 @@ class CommunityNews < ApplicationRecord # Validations validates :author_id, presence: true - validates :title, presence: true + validates :title, presence: true, length: { maximum: 150 } validates :body, presence: true # Nested attributes