Perhaps elaborate more on your requirements...maybe taking the following suggestions in mind:How To Ask Questions The Smart Way
I don't know what you want to 'validate'...what special characters? Do you want - or not want them?