diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 11:06:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 11:06:53 +0000 |
commit | 0bd70d4680513be455e1a612e7ad0f547246b5bd (patch) | |
tree | 98fb79ea01223d3694ce2bf4ae0278d2d06a080f | |
parent | 147e7a8d61722e99e31cf881b3fc0b8e9c4e6a11 (diff) | |
download | redmine-0bd70d4680513be455e1a612e7ad0f547246b5bd.tar.gz redmine-0bd70d4680513be455e1a612e7ad0f547246b5bd.zip |
Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/wiki_page.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |