ActiveRecord’s validation system puts other database systems to shame.
However, the newbies might not know how to write a regexp that
excludes a match, instead of tests for it. Understand - I’m just
asking this question to help them. I have been using Regexps since
‘grep’ on Xenix! But the newbies here might not know how to do this:
validates_format_of :field_must_break, :with => /\n/
validates_format_of :field_must_not_break, :with => /^[^\n]$/
The second one fails with data that correctly have no \n linefeed in
How do I - I mean “they” - negate a regexp?
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!