check for errors in register form