No results found!
IObjectValidator
is implemented by theObjectValidator
by default.ObjectValidator
is extensible; you can implementIObjectValidationContributor
interface to contribute a custom logic. Example:
public class MyObjectValidationContributor : IObjectValidationContributor, ITransientDependency{ public Task AddErrorsAsync(ObjectValidationContext context) { //Get the validating object var obj = context.ValidatingObject; //Add the validation errors if available context.Errors.Add(...); return Task.CompletedTask; }}
ITransientDependency
does it just like in this example)IMethodInvocationValidator
is used to validate a method call. It internally uses theIObjectValidator
to validate objects passes to the method call. You normally don't need to this service since it is automatically used by the framework, but you may want to reuse or replace it on your application in rare cases.
Volo.Abp.FluentValidation package integrates the FluentValidation library to the validation system (by implementing theIObjectValidationContributor
). See theFluentValidation Integration document for more.
Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.