public void ValidateUserUid(InputPausedEvent e, LoginInputFieldNode.NormalState loginInputField, [JoinByScreen] UidInputValidationTextNode strings, [JoinAll] SingleNode <ClientSessionComponent> clientSession, [JoinAll] SingleNode <EntranceValidationRulesComponent> rules) { string input = loginInputField.Input; UidInputValidationTextComponent uidInputValidationText = strings.uidInputValidationText; if (string.IsNullOrEmpty(input)) { loginInputField.ToNormalState(); } else if (!rules.component.IsLoginEndingValid(input)) { loginInputField.ToInvalidState(uidInputValidationText.LoginEndsWithSpecialSymbol); } else if (rules.component.IsLoginTooShort(input)) { loginInputField.ToInvalidState(uidInputValidationText.LoginIsTooShort); } else if (rules.component.IsLoginTooLong(input)) { loginInputField.ToInvalidState(uidInputValidationText.LoginIsTooLong); } else { loginInputField.ToAwaitState(); base.ScheduleEvent(new CheckUserUidEvent(input), clientSession); } }
public void InputChangedWithDelay(InputPausedEvent e, InputFieldNode inputField, [JoinAll] SelfUserNode selfUser) { string str = inputField.inputField.Input.Trim(); if (!string.IsNullOrEmpty(str)) { inputField.esm.Esm.ChangeState <InputFieldStates.AwaitState>(); inputField.interactivityPrerequisiteESM.Esm.ChangeState <InteractivityPrerequisiteStates.NotAcceptableState>(); base.Log.InfoFormat("InputChangedWithDelay {0}", str); CheckPromoCodeEvent eventInstance = new CheckPromoCodeEvent { Code = str }; base.ScheduleEvent(eventInstance, selfUser); } }
public void ValidateEmail(InputPausedEvent e, EmailInputFieldNode emailInputField, [JoinAll] SingleNode <EntranceValidationRulesComponent> rules, [JoinAll] SingleNode <ClientSessionComponent> clientSession) { if (string.IsNullOrEmpty(emailInputField.Input)) { emailInputField.ToNormalState(); } else if (!rules.component.IsEmailValid(emailInputField.Input)) { emailInputField.ToInvalidState(emailInputField.marker.EmailIsInvalid); } else { emailInputField.ToAwaitState(); base.ScheduleEvent(new CheckEmailEvent(emailInputField.Input, emailInputField.marker.IncludeUnconfirmed), clientSession); } }
public void ValidatePassword(InputPausedEvent e, PasswordInputFieldNode.NormalState passwordInputField, [JoinByScreen] SingleNode <PasswordErrorsComponent> strings, [JoinAll] SingleNode <EntranceValidationRulesComponent> rules) { this.ChangePasswordInputFieldState(passwordInputField, strings.component, rules.component); }
public void ValidateRepetitionPassword(InputPausedEvent e, RepetitionPasswordInputFieldNode repetitionPasswordInputField, [JoinByScreen] PasswordInputFieldNode.ValidState passwordInputField, [JoinByScreen] SingleNode <PasswordErrorsComponent> strings) { this.CheckRepetitionPassword(repetitionPasswordInputField, passwordInputField, strings.component); }