Not allowing illegal characters in register form