public void ChangeInputState() { inputValue = true; if (string.IsNullOrEmpty(UserInput.text)) { userValidated = false; ShowErrorText(TacoConfig.TacoRegisteredErrorMessage03); UserOkay.SetActive(false); } else if (UserInput.text.Length < TacoConfig.UsernameMinLength) { userValidated = false; ShowErrorText(TacoConfig.TacoRegisteredErrorUsernameLength); UserOkay.SetActive(false); } else if (!TacoManager.ValidateUsername(UserInput.text)) { userValidated = false; ShowErrorText(TacoConfig.TacoRegisteredErrorUsernameFormat); UserOkay.SetActive(false); } else { userValidated = true; UserOkay.SetActive(true); if (StatusText.text == TacoConfig.TacoRegisteredErrorMessage03) { ShowErrorText(); } } ToggleRegisterButton(AllInputIsValid()); }