add validation for register