Here's a little snippet that Pathologic helped with to add spam word validation to FormLister.
Create a snippet called 'checkMessage' (you can call this whatever you want):
<?php
$badWords = $FormLister->config->loadArray($FormLister->getCFGDef('badWords'));
foreach ($badWords as $word) {
if(stripos($data['formmessage'], $word) !== false) {
$FormLister->addError('formmessage', '', 'Please do not use links or spam words in your message', 'Bad message');
break;
}
}
Change 'formmessage' above with the name of the field you want to check (<textarea name="formmessage" ... ), and edit the error message you'd like to display if a bad word is found.
Add the following to your FormLister call:
&prepare=`checkMessage`
&badWords=`comma,separated,list,of,bad,words`