public bool FindEmailid(string s) //It compares the name passed in the arguments with name in the object and returns true if found { return(Emailid.ToLower().Equals(s.ToLower())); }
public void SaveuserDataAndLoadExtraScene() { if (Password.Length > 0 && Newpassword.Length == 0) { print("Enter New Password"); StartCoroutine(Warningmethod("Please Enter New Password")); } else if (Password.Length == 0 && Newpassword.Length > 1) { print("Enter Password"); StartCoroutine(Warningmethod("Please Enter Password")); } else if (Username.Length == 0) { print("Enter Username"); StartCoroutine(Warningmethod("Please Enter username")); } else if (Emailid.Length == 0) { print("Enter Emailid"); StartCoroutine(Warningmethod("Please Enter MailID")); } else if (Mobilenumber.Length == 0) { print("Enter Mobile Number"); StartCoroutine(Warningmethod("Please Enter Mobile Number")); } else if (Mobilenumber.Length < 10) { print("Mobile number is too short"); StartCoroutine(Warningmethod("Mobile number is too short")); } else if (Application.internetReachability == NetworkReachability.NotReachable) { print("No Internet Connection"); StartCoroutine(Warningmethod("Please connect to internet")); } else if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork || Application.internetReachability == NetworkReachability.ReachableViaCarrierDataNetwork) { print("internet connection"); if ((Password.Length == 0 && Newpassword.Length == 0) || (Password.Length > 0 && Newpassword.Length > 0)) { if (Password.Length > 0 && Newpassword.Length > 0) { if (Password.Equals(Newpassword)) { print("Please enter different new Password"); } else if (!Password.Equals(Newpassword)) { print("Password is matching"); Regex regex = new Regex(@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"); bool isValid = regex.IsMatch(Emailid.Trim()); if (!isValid) { print("Not valid emailid"); StartCoroutine(Warningmethod("Please Enter Valid Email")); } else { print("Valid Emailid"); print("Can Proceed"); StartCoroutine(SaveUserData()); } // StartCoroutine (SaveUserData ()); } } if (Password.Length == 0 && Newpassword.Length == 0) { Regex regex = new Regex(@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"); bool isValid = regex.IsMatch(Emailid.Trim()); if (!isValid) { print("Not valid emailid"); StartCoroutine(Warningmethod("Please Enter Valid Email")); } else { print("Valid Emailid"); print("Can Proceed"); StartCoroutine(SaveUserData()); } } } } }