Class ValidationError
- Namespace
- WorkflowForge.Extensions.Validation
- Assembly
- WorkflowForge.Extensions.Validation.dll
Represents a validation error with property name and error message.
public sealed class ValidationError
- Inheritance
-
ValidationError
- Inherited Members
Constructors
ValidationError(string, string)
Initializes a new instance of the ValidationError class.
public ValidationError(string propertyName, string errorMessage)
Parameters
propertyNamestringThe name of the property that failed validation.
errorMessagestringThe error message.
Properties
ErrorMessage
Gets the error message.
public string ErrorMessage { get; }
Property Value
PropertyName
Gets the name of the property that failed validation.
public string PropertyName { get; }
Property Value
Methods
ToString()
Returns a string representation of the validation error.
public override string ToString()
Returns
- string
A formatted error message.