Added validation for length of thread title.
This commit is contained in:
@@ -11,6 +11,7 @@ class Forumthread < ActiveRecord::Base
|
||||
|
||||
validates_presence_of :title, :author, :forum
|
||||
validates_presence_of :content
|
||||
validates_length_of :title, in: 5..255
|
||||
validates_length_of :content, in: 5..20000
|
||||
|
||||
accepts_nested_attributes_for :threadreplies
|
||||
|
||||
Reference in New Issue
Block a user