Use \A and \z in validation regexps.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-08 11:06:53 +00:00
parent 147e7a8d61
commit 0bd70d4680
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class WikiPage < ActiveRecord::Base
attr_accessor :redirect_existing_links
validates_presence_of :title
validates_format_of :title, :with => /^[^,\.\/\?\;\|\s]*$/
validates_format_of :title, :with => /\A[^,\.\/\?\;\|\s]*\z/
validates_uniqueness_of :title, :scope => :wiki_id, :case_sensitive => false
validates_associated :content