Example #1
0
 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);
     }
 }