public string ValidateProperty(IValidateable validationObject, string propertyName) { var result = ValidationConstants.NoError(); var validationRuleResults = this.ValidationRules .Select(rule => rule.ValidateProperty(validationObject, propertyName)) .Where(err => !string.IsNullOrWhiteSpace(err)).ToArray(); if (validationRuleResults.Any()) { result += string.Join(Environment.NewLine, validationRuleResults); } return(result); }
protected string NoError() { return(ValidationConstants.NoError()); }