recursive function applied to enable checking for multiple invalid chara...

...cters