mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
17 lines
460 B
C#
17 lines
460 B
C#
using FluentValidation;
|
|
|
|
namespace Features.Breweries.Commands.UpdateBrewery;
|
|
|
|
/// <summary>
|
|
/// Applies update rules to <see cref="UpdateBreweryCommand" />.
|
|
/// </summary>
|
|
public class UpdateBreweryValidator : AbstractValidator<UpdateBreweryCommand>
|
|
{
|
|
public UpdateBreweryValidator()
|
|
{
|
|
RuleFor(x => x.RowVersion)
|
|
.NotEmpty()
|
|
.WithMessage("RowVersion is required to detect conflicting concurrent updates.");
|
|
}
|
|
}
|