]> source.dussan.org Git - redmine.git/commitdiff
Use \A and \z in validation regexps.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 8 Dec 2012 11:06:53 +0000 (11:06 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 8 Dec 2012 11:06:53 +0000 (11:06 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/wiki_page.rb

index 31b8845a3ef27c34678f1cab4430dccfce8ab9d4..d88c833849cce59536b3b2d40cf23e41059e5bf3 100644 (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