Exemple #1
0
        private bool AcceptInputFieldsContent()
        {
            if (emailInputField.text == string.Empty)
            {
                ShowNotice?.Invoke("Email address can not be empty.");
                return(false);
            }

            if (!emailInputField.text.IsValidEmailAddress())
            {
                ShowNotice?.Invoke("Email address is not valid.");
                return(false);
            }

            if (passwordInputField.text == string.Empty)
            {
                ShowNotice?.Invoke("Password can not be empty.");
                return(false);
            }

            if (passwordInputField.text.Length <= passwordCharacters)
            {
                ShowNotice?.Invoke("Password is not match.");
                return(false);
            }

            return(true);
        }
Exemple #2
0
        private bool AcceptInputFieldsContent()
        {
            if (emailInputField.text == string.Empty)
            {
                ShowNotice?.Invoke("Email address can not be empty.");
                return(false);
            }

            if (!emailInputField.text.IsValidEmailAddress())
            {
                ShowNotice?.Invoke("Email address is not valid.");
                return(false);
            }

            if (passwordInputField.text == string.Empty || rePasswordInputField.text == string.Empty)
            {
                ShowNotice?.Invoke("Passwords can not be empty.");
                return(false);
            }

            if (passwordInputField.text.Length <= passwordCharacters)
            {
                ShowNotice?.Invoke("Please enter a longer password.");
                return(false);
            }

            if (firstNameInputField.text.Length < firstLastNameCharacters ||
                lastNameInputField.text.Length < firstLastNameCharacters)
            {
                ShowNotice?.Invoke("First or last name is too short.");
                return(false);
            }

            if (passwordInputField.text != rePasswordInputField.text)
            {
                ShowNotice?.Invoke("Passwords are not match.");
                return(false);
            }

            return(true);
        }
Exemple #3
0
 public void OnShowNotice(ShowNoticeEvent @event)
 {
     ShowNotice?.Invoke(this, @event);
     // The notice is being shown
 }