fixed register form validation bug