Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10960 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+1
-1
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user