Exemple #1
0
        private void txtName_Validating(object sender, CancelEventArgs e)
        {
            string error;

            if (!ValidationInput.ValidateUserName(txtName.Text, out error))
            {
                errorProvider1.SetError(txtName, error);
                e.Cancel = true;
            }
        }