##// END OF EJS Templates
Use \A and \z in validation regexps....
Jean-Philippe Lang -
r10734:0bd70d468051
parent child
Show More
@@ -40,7 +40,7 class WikiPage < ActiveRecord::Base
40 attr_accessor :redirect_existing_links
40 attr_accessor :redirect_existing_links
41
41
42 validates_presence_of :title
42 validates_presence_of :title
43 validates_format_of :title, :with => /^[^,\.\/\?\;\|\s]*$/
43 validates_format_of :title, :with => /\A[^,\.\/\?\;\|\s]*\z/
44 validates_uniqueness_of :title, :scope => :wiki_id, :case_sensitive => false
44 validates_uniqueness_of :title, :scope => :wiki_id, :case_sensitive => false
45 validates_associated :content
45 validates_associated :content
46
46
General Comments 0
You need to be logged in to leave comments. Login now