From: Jean-Philippe Lang Date: Sat, 8 Dec 2012 11:06:53 +0000 (+0000) Subject: Use \A and \z in validation regexps. X-Git-Tag: 2.3.0~473 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0bd70d4680513be455e1a612e7ad0f547246b5bd;p=redmine.git Use \A and \z in validation regexps. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 31b8845a3..d88c83384 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -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