Exemple #1
0
        private MyTextsWrapperEnum?ValidateInput()
        {
            MyTextsWrapperEnum?errorMessage = null;

            if (MyMwcUtils.IsValidUsernameFormat(m_usernameTextbox.Text) == false)
            {
                errorMessage = MyTextsWrapperEnum.ValidationUsername;
            }
            else if (MyMwcUtils.IsValidPasswordFormat(m_passwordTextbox.Text) == false)
            {
                errorMessage = MyTextsWrapperEnum.ValidationPasswordWrong;
            }
            else if (MyMwcUtils.IsValidEmailAddress(m_emailTextbox.Text) == false)
            {
                errorMessage = MyTextsWrapperEnum.ValidationEmailWrong;
            }
            else if (m_passwordTextbox.Text != m_retypePasswordTextbox.Text)
            {
                errorMessage = MyTextsWrapperEnum.ValidationPasswordsDoNotMatch;
            }
            return(errorMessage);
        }