In this case, the maskedtextboxTEL (00)0000-0000
would return a error provider
and would only continue after completing it.
In this case, the maskedtextboxTEL (00)0000-0000
would return a error provider
and would only continue after completing it.
You can use método
String.IsNullOrWhiteSpace .
Code
if (String.IsNullOrWhiteSpace(txt_Telefone.Text))
{
errorProvider1.SetError(txt_Telefone, "Preencha o telefone ! ");
}