diff --git a/app/models/comment.rb b/app/models/comment.rb index 51ce7d91..fcaf7c24 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -3,4 +3,6 @@ class Comment < ActiveRecord::Base belongs_to :answer validates :user_id, presence: true validates :answer_id, presence: true + + validates :content, length: { maximum: 160 } end