From 147e7a8d61722e99e31cf881b3fc0b8e9c4e6a11 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 8 Dec 2012 10:59:31 +0000 Subject: Use \A and \z in validation regexps. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10960 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/wiki.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/wiki.rb') diff --git a/app/models/wiki.rb b/app/models/wiki.rb index 983bb94f6..078b2a04b 100644 --- a/app/models/wiki.rb +++ b/app/models/wiki.rb @@ -24,7 +24,7 @@ class Wiki < ActiveRecord::Base acts_as_watchable validates_presence_of :start_page - validates_format_of :start_page, :with => /^[^,\.\/\?\;\|\:]*$/ + validates_format_of :start_page, :with => /\A[^,\.\/\?\;\|\:]*\z/ safe_attributes 'start_page' -- cgit v1.2.3