How to prevent node creation if blacklisted words detected in the body? I have a forum and when user creates new thread (which is some custom content type) and if the thread lets say has word 'loan' in it somewhere, in a title field, or a body field and etc. then the thread doesn't get saved and gives some warning or something like that.

Is there a module for that? Recently my forum got spammed with loans and there's about 1000 of those threads and all about loans. And those spams bypass all anti spam protections. So I came up with this 'brilliant' idea.

Please don't suggest Captchas and etc. I need something like I described with a blacklist.
I can't give you working code, but the basic approach I have used is:


Make a new Vocabulary.  Call it Naughty Words.  Populate it with all of your naughty words.
hook_form_alter() your submission form, and push on a new $form['#validate'] functions.
In your validation function, read in all of the naughty word terms into an array.  Then check the submitted element(s) against the naughty words.  form_set_error() if there is a match.  


There are several ways to do the matching.  One is a simple loop with a strpos against each term; another is to explode the submission and then do an array intersection.  Play around with it in something standalone.