/// <summary> /// Retorna resumo dos erros /// </summary> /// <param name="validable">Objeto a ser validado</param> /// <returns>Resumo dos erros</returns> public ValidationSummary GetSummary(Validable validable) { var summary = new ValidationSummary(); var castleSummary = this.runner.GetErrorSummary(validable); foreach (var property in castleSummary.InvalidProperties) { foreach (var error in castleSummary.GetErrorsForProperty(property)) { summary.Add(property, error); } } return(summary); }
public bool IsValid(Validable validable, RunWhen runWhen) { return(this.runner.IsValid(validable, runWhen)); }
/// <summary> /// Checa se objeto é válido /// </summary> /// <param name="validable">Objeto a ser validado</param> /// <returns>True se é válido</returns> public bool IsValid(Validable validable) { return(this.runner.IsValid(validable, RunWhen.Everytime)); }