public SignUpPage FillMobileNumber(string number) { MobileNumberInputField.Click(); MobileNumberInputField.Clear(); MobileNumberInputField.SendKeys(RandomDataGenerator.RandomAlphaNumericString(10)); return(this); }
public void SendOTP() { SoundController.soundsControllerInstance.PlayButtonsound(); PhoneNumber = MobileNumberInputField.text.ToString(); Email = EmailInputField.GetComponent <InputField>().text.ToString(); Name = NameInputField.GetComponent <InputField>().text.ToString(); DeviceId = SystemInfo.deviceUniqueIdentifier.ToString(); if (!string.IsNullOrEmpty(PhoneNumber) && PhoneNumber.Length == 10 && !string.IsNullOrEmpty(Email) && validateEmail(Email) && !string.IsNullOrEmpty(Name)) { StartCoroutine(WebServiceController.webServiceController_Instance.SendOTPUrl(PhoneNumber, Email, Name, DeviceId)); OTPInputFieldDialogOpen(); OTPDialog.SetActive(true); } else { if (string.IsNullOrEmpty(PhoneNumber) || PhoneNumber.Length != 10) { MobileNumberInputField.text = ""; MobileNumberInputField.placeholder.GetComponent <Text>().text = "Enter valid number"; MobileNumberInputField.placeholder.GetComponent <Text>().color = Color.red; Animator anim = MobileNumberInputField.GetComponent <Animator>(); anim.Play("WrongInputFieldShake"); } if (string.IsNullOrEmpty(Email) || !validateEmail(Email)) { EmailInputField.text = ""; EmailInputField.placeholder.GetComponent <Text>().text = "Enter valid email"; EmailInputField.placeholder.GetComponent <Text>().color = Color.red; Animator anim = EmailInputField.GetComponent <Animator>(); anim.Play("WrongInputFieldShake"); } if (string.IsNullOrEmpty(Name)) { NameInputField.text = ""; NameInputField.placeholder.GetComponent <Text>().text = "Enter valid name"; NameInputField.placeholder.GetComponent <Text>().color = Color.red; Animator anim = NameInputField.GetComponent <Animator>(); anim.Play("WrongInputFieldShake"); } } }