Enhance validation to reject unwanted characters