Table of Contents

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

Dictionary<string, object>

DefaultRuleSet

Gets or sets the default rule set to evaluate. Null means all rules.

public string? DefaultRuleSet { get; set; }

Property Value

string

DomainContextFactory

Gets or sets a custom factory for creating DomainContext from HttpContext.

public Func<HttpContext, DomainContext>? DomainContextFactory { get; set; }

Property Value

Func<HttpContext, DomainContext>

HandleExceptionsGlobally

Gets or sets whether to handle DomainValidationException globally.

public bool HandleExceptionsGlobally { get; set; }

Property Value

bool

IncludeInfo

Gets or sets whether to include info-level messages in responses.

public bool IncludeInfo { get; set; }

Property Value

bool

IncludeWarnings

Gets or sets whether to include warnings in the response.

public bool IncludeWarnings { get; set; }

Property Value

bool

StopOnFirstError

Gets or sets whether to stop on first error during validation.

public bool StopOnFirstError { get; set; }

Property Value

bool

SuppressGetRequestValidation

Gets or sets whether to suppress validation for GET requests.

public bool SuppressGetRequestValidation { get; set; }

Property Value

bool

ValidationFailureStatusCode

Gets or sets the HTTP status code for validation failures. Default is 400 Bad Request.

public int ValidationFailureStatusCode { get; set; }

Property Value

int