Skip to content

Commit

Permalink
Add identifier & error message constructor to ValidationError (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
gordysc authored Oct 28, 2024
1 parent 74c1a48 commit 705bc4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Ardalis.Result/ValidationError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ public ValidationError()

public ValidationError(string errorMessage) => ErrorMessage = errorMessage;

public ValidationError(string identifier, string errorMessage)
{
Identifier = identifier;
ErrorMessage = errorMessage;
}

public ValidationError(string identifier, string errorMessage, string errorCode, ValidationSeverity severity)
{
Identifier = identifier;
Expand Down

0 comments on commit 705bc4c

Please sign in to comment.