public static class ValidatorTool { public static bool Validate(IValidator validator,IEntity entity) { bool result = true; var validationResult = validator.Validate(entity); if (!validationResult.IsValid) { string message = null; foreach (var error in validationResult.Errors) { message += error.ErrorMessage+System.Environment.NewLine; } MessageBox.Show(message); result = false; } return result;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)