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
severityValidationSeverityThe severity of the issue.
messagestringA human-readable description of the issue.
propertyNamestringThe name of the property that caused the issue, or
nullif not applicable.
Exceptions
- ArgumentNullException
messageis null.
Properties
Message
Gets the human-readable description of this validation issue.
public string Message { get; }
Property Value
PropertyName
Gets the name of the property that caused this issue, or null if not applicable.
public string? PropertyName { get; }
Property Value
Severity
Gets the severity of this validation issue.
public ValidationSeverity Severity { get; }
Property Value
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.