Skip to content

Commit

Permalink
Filter property names to for SetValidator rules
Browse files Browse the repository at this point in the history
  • Loading branch information
matthetherington-pa committed Dec 7, 2023
1 parent a3304ae commit 9b7fd1d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private static async Task ValidateField(EditContext editContext,
{
var validationResults = await validator.ValidateAsync(new ValidationContext<object>(editContext.Model, new PropertyChain(), compositeSelector));
var errorMessages = validationResults.Errors
.Where(validationFailure => validationFailure.PropertyName == propertyPath)
.Select(validationFailure => validationFailure.ErrorMessage)
.Distinct();

Expand Down

0 comments on commit 9b7fd1d

Please sign in to comment.