add validation to the registration form