<ro*@segl.ca> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I have a access based guest book. I want to create a validation rule to
block certain words or parts of a srting. How do i do this?
ie: this is a nice site. come visit my porn site at www.abc.zy
If the message contains the word porn, can I block the whole message
using a validation rule
While you could have a validation rule such as:
Not Like "*porn*" And Not Like "*sex*"
A validation rule really is not the place to do it. You don't say what you
have used to create the web pages, but if this was ASP, then if a user
entered an offending word, an error would be generated when the table could
not be updated. Sure you can catch this error, but if you're going to do
that you might as well catch the error before it happens and let your web
page say "I can't create an entry because you have used the word x".
Another reason not to do it like this, is that your database and website
should not need constant updating to if you want to add a word to the banned
list. You should not have to take the database offline and change the
validation rule each time you think of something new.
As a final point, if the site is accessible to the whole wide world with no
login, then it will be impossible to ensure you never have content posted
which might offend someone. You might do better focussing on making it
easier for yourself to remove unwanted entries.