validation and bits for the registration form