Skip to content

Instantly share code, notes, and snippets.

@orient-man
Created November 15, 2012 16:00
Show Gist options
  • Save orient-man/4079379 to your computer and use it in GitHub Desktop.
Save orient-man/4079379 to your computer and use it in GitHub Desktop.
Validation
namespace MyCompany.Infrastructure.Validation
{
// implemented in UI layer
public interface IValidationListener
{
void OnError(string error);
void OnWarning(string warning);
bool IsIgnored(string warning);
}
// stops on first error but reports all warnings
public interface IValidator
{
/// <returns>False if any error or warning</returns>
bool Validate(IValidationListener listener);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment