Add name to validation rule in ReadOutResQueryValidator

The validation rule in the `ReadOutResQueryValidator` class was updated to include a `WithName("Identifier")` call. This assigns a name ("Identifier") to the rule, improving the clarity and usability of validation error messages, especially in scenarios where multiple rules are applied and need to be distinguished.
This commit is contained in:
tekh 2025-12-04 10:17:57 +01:00
parent 3b4671c8e5
commit 906d99105c

View File

@ -8,6 +8,7 @@ public class ReadOutResQueryValidator : AbstractValidator<ReadOutResQuery>
{
RuleFor(x => x)
.Must(x => x.ActionId.HasValue || x.ProfileId.HasValue)
.WithMessage("At least one of ActionId or ProfileId must be provided.");
.WithMessage("At least one of ActionId or ProfileId must be provided.")
.WithName("Identifier");
}
}