Use \A and \z in validation regexps.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10961 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
147e7a8d61
commit
0bd70d4680
@ -40,7 +40,7 @@ class WikiPage < ActiveRecord::Base
|
|||||||
attr_accessor :redirect_existing_links
|
attr_accessor :redirect_existing_links
|
||||||
|
|
||||||
validates_presence_of :title
|
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_uniqueness_of :title, :scope => :wiki_id, :case_sensitive => false
|
||||||
validates_associated :content
|
validates_associated :content
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user