Add validation to registration.