Is there a Rails validation helper or an easy way of preventing
attributes from containing a certain word match, e.g. you have a User
model, the user has a name attribute, and you don't want the @user.name
to == 'MyRailsApp' or to have 'MyRailsApp' somewhere in there?

I imagine it would look something like this (although I can't get this
one to work - it always fails);

  validates_format_of :name, :with => /!MyRailsApp/i, :message => "You
can't use our Website name."

Any ideas?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to