validation for register page