Hey guys, I thought this would be fairly straightforward, but it's not it seems..maybe I'm just writing the syntax wrong..
In my model I'm checking for certain key words
before_validation :deal_validation
def deal_validation
if self.description.match /(exp\s|expire|ex\s|print|mention|\/)/
errors.add(:description, "Now just a second! You can't use those words!")
end
end
But it doesn't seem to stop the saving of the model.
Am I missing something?