Class ValidationIssue

Namespace
Wolfgang.Extensions.Mail.Validation
Assembly
Wolfgang.Extensions.Mail.dll

Represents a single validation issue found when validating a MailMessage.

public sealed class ValidationIssue
Inheritance
ValidationIssue
Inherited Members

Constructors

ValidationIssue(ValidationSeverity, string, string?)

Initializes a new instance of the ValidationIssue class.

public ValidationIssue(ValidationSeverity severity, string message, string? propertyName = null)

Parameters

severity ValidationSeverity

The severity of the issue.

message string

A human-readable description of the issue.

propertyName string

The name of the property that caused the issue, or null if not applicable.

Exceptions

ArgumentNullException

message is null.

Properties

Message

Gets the human-readable description of this validation issue.

public string Message { get; }

Property Value

string

PropertyName

Gets the name of the property that caused this issue, or null if not applicable.

public string? PropertyName { get; }

Property Value

string

Severity

Gets the severity of this validation issue.

public ValidationSeverity Severity { get; }

Property Value

ValidationSeverity

Methods

ToString()

Returns a string representation of this validation issue.

public override string ToString()

Returns

string

A formatted string containing the severity, property name, and message.