Class DomainValidationOptions
- Namespace
- JD.Domain.AspNetCore
- Assembly
- JD.Domain.AspNetCore.dll
Configuration options for domain validation in ASP.NET Core.
public sealed class DomainValidationOptions
- Inheritance
-
DomainValidationOptions
- Inherited Members
Properties
AdditionalContext
Gets additional context properties to include in rule evaluations.
public Dictionary<string, object?> AdditionalContext { get; }
Property Value
DefaultRuleSet
Gets or sets the default rule set to evaluate. Null means all rules.
public string? DefaultRuleSet { get; set; }
Property Value
DomainContextFactory
Gets or sets a custom factory for creating DomainContext from HttpContext.
public Func<HttpContext, DomainContext>? DomainContextFactory { get; set; }
Property Value
HandleExceptionsGlobally
Gets or sets whether to handle DomainValidationException globally.
public bool HandleExceptionsGlobally { get; set; }
Property Value
IncludeInfo
Gets or sets whether to include info-level messages in responses.
public bool IncludeInfo { get; set; }
Property Value
IncludeWarnings
Gets or sets whether to include warnings in the response.
public bool IncludeWarnings { get; set; }
Property Value
StopOnFirstError
Gets or sets whether to stop on first error during validation.
public bool StopOnFirstError { get; set; }
Property Value
SuppressGetRequestValidation
Gets or sets whether to suppress validation for GET requests.
public bool SuppressGetRequestValidation { get; set; }
Property Value
ValidationFailureStatusCode
Gets or sets the HTTP status code for validation failures. Default is 400 Bad Request.
public int ValidationFailureStatusCode { get; set; }