add validation for the register page