Class ValidationError
- Namespace
- Excalibur.Dispatch.Validation
- Assembly
- Excalibur.Dispatch.Abstractions.dll
Represents a validation error.
public sealed class ValidationError
- Inheritance
-
ValidationError
- Inherited Members
- Extension Methods
Constructors
ValidationError(string)
Initializes a new instance of the ValidationError class.
public ValidationError(string message)
Parameters
messagestringThe error message.
ValidationError(string, string)
Initializes a new instance of the ValidationError class.
public ValidationError(string propertyName, string message)
Parameters
Properties
ErrorCode
Gets or sets the error code.
public string? ErrorCode { get; set; }
Property Value
- string
The error code used for categorization.
Message
Gets the error message.
public string Message { get; }
Property Value
- string
The user-facing error message.
Metadata
Gets additional metadata for the error.
public IDictionary<string, object>? Metadata { get; init; }
Property Value
- IDictionary<string, object>
Optional metadata associated with the error.
PropertyName
Gets the property name associated with the error.
public string? PropertyName { get; }
Property Value
- string
The name of the property in error, when applicable.