Clean up
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
using Imprink.Application.Domains.ProductVariants;
|
||||
|
||||
namespace Imprink.Application.Validation.ProductVariants;
|
||||
|
||||
public class GetProductVariantsQueryValidator : AbstractValidator<GetProductVariantsQuery>
|
||||
{
|
||||
public GetProductVariantsQueryValidator()
|
||||
{
|
||||
RuleFor(x => x.ProductId)
|
||||
.NotEqual(Guid.Empty).When(x => x.ProductId.HasValue)
|
||||
.WithMessage("ProductId must be a valid GUID when provided.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user