character validation working