fix register form validation