This should be complete validation code for registrations.