summaryrefslogtreecommitdiffstats
path: root/app/models/wiki_page.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 11:13:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-19 11:13:41 +0000
commit7b3f2b51c0ea735a4723fae24eff9bfbca254d8a (patch)
tree9d3f5786993a64e0f106ba82f31a9a1d8d06e6bb /app/models/wiki_page.rb
parente610fda877a44c7b194edddcbe6c71bb234401a1 (diff)
downloadredmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.tar.gz
redmine-7b3f2b51c0ea735a4723fae24eff9bfbca254d8a.zip
Add length validations for string fields (#24283).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@15989 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r--app/models/wiki_page.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index ae1e74cca..9922fa4be 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -45,6 +45,7 @@ class WikiPage < ActiveRecord::Base
validates_presence_of :title
validates_format_of :title, :with => /\A[^,\.\/\?\;\|\s]*\z/
validates_uniqueness_of :title, :scope => :wiki_id, :case_sensitive => false
+ validates_length_of :title, maximum: 255
validates_associated :content
attr_protected :id