private void OnRegisterButtonClicked( UIRegistrationDetails uiRegistrationDetails) { var email = uiRegistrationDetails.Email; var password = uiRegistrationDetails.Password; var confirmPassword = uiRegistrationDetails.ConfirmPassword; var firstName = uiRegistrationDetails.FirstName; var lastName = uiRegistrationDetails.LastName; if (authenticationValidator.IsEmptyEmailAddress(email, out var message) || authenticationValidator.IsInvalidEmailAddress(email, out message) || authenticationValidator.IsEmptyPassword(password, out message) || authenticationValidator.IsEmptyConfirmPassword(confirmPassword, out message) || authenticationValidator.IsPasswordTooShort(password, out message) || authenticationValidator.IsConfirmPasswordTooShort(confirmPassword, out message) || authenticationValidator.ArePasswordsDoNotMatch(password, confirmPassword, out message) || authenticationValidator.IsFirstNameEmpty(firstName, out message) || authenticationValidator.IsLastNameEmpty(lastName, out message) || authenticationValidator.IsFirstNameTooShort(firstName, out message) || authenticationValidator.IsLastNameTooShort(lastName, out message)) { NoticeUtils.ShowNotice(message); } else { registrationView?.DisableInteraction(); authenticatorInteractor.Register(uiRegistrationDetails); } }
public void Register(UIRegistrationDetails uiRegistrationDetails) { var email = uiRegistrationDetails.Email; var password = uiRegistrationDetails.Password; var firstName = uiRegistrationDetails.FirstName; var lastName = uiRegistrationDetails.LastName; authenticatorApi?.Register(email, password, firstName, lastName); }
private void OnRegisterButtonClicked() { var email = emailInputField?.text; var password = passwordInputField?.text; var confirmPassword = confirmPasswordInputField?.text; var firstName = firstNameInputField?.text; var lastName = lastNameInputField?.text; var registrationDetails = new UIRegistrationDetails( email, password, confirmPassword, firstName, lastName); RegisterButtonClicked?.Invoke(registrationDetails); }