Hello,
I'm trying to make a validation that catches special latin chars that cause Mysql errors.
Here's what I've been trying so far:
validates_format_of :title, :with=>/\A[^#]/, :message=>'must not start with a "#"', :if => Proc.new {|page| page.title && page.title.size > 0 }
validates_exclusion_of :title, :in => 'π ≤ ≥ ∫ √ ≈ Ω ∞ ≠ ∑ ∂ ∆ ˙ ˚', :message => "Title contains invalid characters" When I throw these characters into the textfield, they aren't dectected and the sql error is thrown.