public void ValidateModel(TModel model) { RulesException.ErrorsForValidationResults(ValidateModelProperties(model)); ValidateModelRules(model); RulesException.ThrowException(); }
public void ValidateModel(TModel model) { ValidateModelPropertiesAndBuildRulesException(model); ValidateModelRules(model); RulesException.ThrowException(); }
public async Task ValidateModelAsync(TModel model) { ValidateModelPropertiesAndBuildRulesException(model); await ValidateModelRulesAsync(model); RulesException.ThrowException(); }
public async Task ValidateModelAsync(TModel model) { RulesException.ErrorsForValidationResults(ValidateModelProperties(model)); await ValidateModelRulesAsync(model); RulesException.ThrowException(); }
public void Validate(RulesBaseParams parameters) { ValidateModelPropertiesAndBuildRulesException(this); if (string.IsNullOrEmpty(Foo)) { RulesException.ErrorFor(x => x.Foo, "Please supply a Foo"); } if (parameters.ThrowException) { RulesException.ThrowException(); } }