using FluentValidation; using Liber_Incantamentum.Application.DTOs.Spell; namespace Liber_Incantamentum.Application.Services.Validations { public class SpellDtoUpdateValidator : AbstractValidator { public SpellDtoUpdateValidator() { RuleFor(m => m.Id) .NotEmpty().WithMessage("The Id cannot be empty"); RuleFor(m => m.Name) .NotEmpty().WithMessage("The Name cannot be empty"); RuleFor(m => m.Description) .NotEmpty().WithMessage("The Description cannot be empty"); RuleFor(m => m.Type) .NotEmpty().WithMessage("The Type cannot be empty"); RuleFor(m => m.CreationDate) .LessThanOrEqualTo(DateTime.UtcNow); RuleFor(m => m.MageId) .NotEmpty().WithMessage("The mage id cannot be empty"); } } }