summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Fick <logaldeveloper@protonmail.com>2017-10-28 20:46:56 -0400
committerLogan Fick <logaldeveloper@protonmail.com>2017-10-28 20:46:56 -0400
commit9aad74664970849fb33573030cd9b29299348026 (patch)
tree2bfca170125936ef4eed7fca40fce86c71ad379a
parent32c72ca01670e5ccc0a9bcb52da9b9ded5190a12 (diff)
Added validation for length of thread title.
-rw-r--r--app/models/forumthread.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/forumthread.rb b/app/models/forumthread.rb
index fd8d3c1..fe551c3 100644
--- a/app/models/forumthread.rb
+++ b/app/models/forumthread.rb
@@ -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