Skip to content

Commit 705bc4c

Browse files
authored
Add identifier & error message constructor to ValidationError (#209)
1 parent 74c1a48 commit 705bc4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Ardalis.Result/ValidationError.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ public ValidationError()
88

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

11+
public ValidationError(string identifier, string errorMessage)
12+
{
13+
Identifier = identifier;
14+
ErrorMessage = errorMessage;
15+
}
16+
1117
public ValidationError(string identifier, string errorMessage, string errorCode, ValidationSeverity severity)
1218
{
1319
Identifier = identifier;

0 commit comments

Comments
 (0)