public static void RequiresNonEmptyText(this ErrorProvider source, Control control) { source.RequiresText(control, (text) => string.IsNullOrEmpty(text), "Text is empty"); }