From 0bd70d4680513be455e1a612e7ad0f547246b5bd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 8 Dec 2012 11:06:53 +0000 Subject: [PATCH] Use \A and \z in validation regexps. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/wiki_page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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