public void onParentEmailUpdateError(IUpdateProfileResult result) { mixLoginCreateService.OnProfileUpdateSuccess -= onParentEmailUpdateSuccess; mixLoginCreateService.OnProfileUpdateFailed -= onParentEmailUpdateError; ResendContainer.gameObject.SetActive(value: true); ResendButtonText.gameObject.SetActive(value: true); ResendButtonPreloader.SetActive(value: false); ResendButton.interactable = true; string text = string.Empty; foreach (IInvalidProfileItemError error in result.Errors) { object obj = text; text = string.Concat(obj, "\t[", error, "]\n"); if (error is IInvalidParentEmailError) { ParentEmailInputField.HasError = true; string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.InvalidEmail"); ParentEmailInputField.ShowError(tokenTranslation); } else { ParentEmailInputField.HasError = true; string tokenTranslation = string.Empty; tokenTranslation += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError"); ParentEmailInputField.ShowError(tokenTranslation); } } }
private void onRecoveryFailed() { loginController.OnRecoveryFailed -= onRecoveryFailed; loginController.OnRecoverySuccess -= onRecoverySuccess; string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("Account.Login.ForgotPassword.NoAccountFound"); EmailAddressInputField.ShowError(tokenTranslation); }
public void OnUpdateDisplayNameError(IUpdateDisplayNameResult result) { ToggleInteraction(isInteractable: true); string errorMessage; if (result is IUpdateDisplayNameExistsResult) { errorMessage = Service.Get <Localizer>().GetTokenTranslation("Acount.Displayname.Validation.AlreadyUsed"); } else if (result is IUpdateDisplayNameFailedModerationResult) { errorMessage = Service.Get <Localizer>().GetTokenTranslation("Acount.Displayname.Validation.NotAllowed"); } else { errorMessage = ""; errorMessage += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError"); } DisplayNameInputField.ShowError(errorMessage); Service.Get <ICPSwrveService>().Action("game.display_name_form.submit", "failed", result.ToString()); }
protected override void showPasswordError(string error) { PasswordField.HasError = !string.IsNullOrEmpty(error); PasswordField.ShowError(error); }
protected override void showUsernameError(string error) { UsernameField.HasError = !string.IsNullOrEmpty(error); UsernameField.ShowError(error); }
protected override void showPasswordError(string error) { PasswordField.HasError = true; PasswordField.ShowError(error); }
protected virtual void showFirstNameError(string errorMessage) { firstNameInputField.HasError = true; firstNameInputField.ShowError(errorMessage); }
protected virtual void showParentEmailError(string errorMessage) { parentEmailInputField.HasError = true; parentEmailInputField.ShowError(errorMessage); }
protected virtual void showPasswordError(string errorMessage) { passwordInputField.HasError = true; passwordInputField.ShowError(errorMessage); }
protected virtual void showUsernameError(string errorMessage) { usernameInputField.HasError = true; usernameInputField.ShowError(errorMessage); }
public void onProfileUpdateError(IUpdateProfileResult result) { ToggleInteraction(isInteractable: true); string text = string.Empty; foreach (IInvalidProfileItemError error in result.Errors) { object obj = text; text = string.Concat(obj, "\t[", error, "]\n"); string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.EnterValid"); if (WhichFields == FormType.MissingInfo) { string tokenTranslation2; if (error is IInvalidParentEmailError) { ParentEmailInputField.HasError = true; tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.InvalidEmail"); ParentEmailInputField.ShowError(tokenTranslation2); continue; } if (error is IInvalidFirstNameError) { FirstNameInputField.HasError = true; tokenTranslation2 = string.Format(tokenTranslation, Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.FirstNameField")); FirstNameInputField.ShowError(tokenTranslation2); continue; } if (error is IInvalidPrivacyPolicyError) { LegalPanel.HasError = true; tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.ppV2"); LegalPanel.ShowError(tokenTranslation2); continue; } InputFieldValidator inputFieldValidator = FirstNameInputField; if (!isFirstNameFieldDisplayed) { inputFieldValidator = ParentEmailInputField; } inputFieldValidator.HasError = true; tokenTranslation2 = string.Empty; tokenTranslation2 += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError"); inputFieldValidator.ShowError(tokenTranslation2); } else if (error is IInvalidPrivacyPolicyError) { LegalPanel.HasError = true; string tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.ppV2"); LegalPanel.ShowError(tokenTranslation2); } else if (error is IInvalidTermsOfUseError) { LegalPanel.HasError = true; string tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.GTOU"); LegalPanel.ShowError(tokenTranslation2); } else { LegalPanel.HasError = true; string tokenTranslation2 = string.Empty; tokenTranslation2 += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError"); LegalPanel.ShowError(tokenTranslation2); } } }