You must first correct your checking events this way:
private void textBox1_Validating(object sender, CancelEventArgs e)
{
Regex regex1 = new Regex(@"^[a-zA-Z]+$");
if (!regex1.IsMatch(textBox1.Text))
{
errorProvider1.SetError(textBox1, "Nosaukums nedrīskt saturēt ciparus!");
e.Cancel = true;
}
else
{
this.errorProvider1.SetError(this.textBox1, "");
}
}
Then you should use ValidateChildrento check if there is a validation error or not, then you can get a list of all errors and show the user as follows:
private void button1_Click(object sender, EventArgs e)
{
if (this.ValidateChildren())
{
}
else
{
var listOfErrors = this.errorProvider1.ContainerControl.Controls.Cast<Control>()
.Select(c => this.errorProvider1.GetError(c))
.Where(s => !string.IsNullOrEmpty(s))
.ToList();
MessageBox.Show("Please correct validation errors:\n - " +
string.Join("\n - ", listOfErrors.ToArray()),
"Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Example screenshot:

Note:
Clear , SetError, this.errorProvider1.SetError(textBox2, "");e.Cancel=true .- , , , , .
- ,
AutoValidate EnableAllowFocusChange Load :
:
this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;