MetroIde.Dialogs.ControlDialogs.MessageBoxInput.ValidateInput C# (CSharp) Method

ValidateInput() private method

private ValidateInput ( ) : void
return void
        private void ValidateInput()
        {
            if (_regexMatch != null)
            {
                string data = txtInput.Text;
                Match match = Regex.Match(data, _regexMatch, RegexOptions.IgnoreCase);

                if (!match.Success)
                {
                    // TODO: aaron, make this more user friendly, huehue
                    MetroMessageBox.Show("Invalid Input", "The text you entered was not valid.");
                    return;
                }
            }

            Result = txtInput.Text;
            Close();
        }