Input Filters in Drupal : DO NOT ALLOW SPECIFIC CHARACTERS
brollo - May 3, 2008 - 23:37
Hello all,
I am trying to figure out how to disallow users to enter specific characters (such as "@", "/", "&" or whatever) in input fields.
I am particularly interested in avoiding users in entering such characters when :
1) Entering Titles of CCK nodes
2) Entering taxonomy terms through free taggable vocabularies
Any ideas please?

_validate
Add your own, additional, validation function to the form via a custom module.
http://api.drupal.org/api/file/developer/topics/forms_api.html/5
overriding node validate or what
So are you suggesting to override the default node.module form validation function to check on nasty characters for title ?
taxonomy.module for free taggable terms?
Could you be more specific if needed please?
A quick dirty trick I did now, is just simply replace bad characters with "" blank string, but I get some "holes" in the DB..
additional validation
Don't override the normal validation - rather add an additional validation function via hook_form_alter in a custom module.