Class DomainValidationAttribute
- Namespace
- JD.Domain.AspNetCore
- Assembly
- JD.Domain.AspNetCore.dll
Action filter attribute that performs domain validation on action parameters.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true)]
public sealed class DomainValidationAttribute : Attribute, IAsyncActionFilter, IFilterMetadata
- Inheritance
-
DomainValidationAttribute
- Implements
- Inherited Members
Properties
RuleSet
Gets or sets the rule set to evaluate.
public string? RuleSet { get; set; }
Property Value
StopOnFirstError
Gets or sets whether to stop on first error.
public bool StopOnFirstError { get; set; }
Property Value
ValidationType
Gets or sets the type to validate. If null, validates all class parameters.
public Type? ValidationType { get; set; }
Property Value
Methods
OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)
Called asynchronously before the action, after model binding is complete.
public Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
Parameters
contextActionExecutingContextnextActionExecutionDelegateThe ActionExecutionDelegate. Invoked to execute the next action filter or the action itself.