21 lines
699 B
C#
21 lines
699 B
C#
using FluentValidation;
|
|
using Liber_Incantamentum.Application.DTOs.Mage;
|
|
|
|
namespace Liber_Incantamentum.Application.Services.Validations
|
|
{
|
|
public class MageDtoUpdateValidator : AbstractValidator<MageDtoUpdate>
|
|
{
|
|
public MageDtoUpdateValidator()
|
|
{
|
|
RuleFor(m => m.Id)
|
|
.NotEmpty().WithMessage("The Id is required");
|
|
RuleFor(m => m.Name)
|
|
.NotEmpty().WithMessage("The Name is required");
|
|
RuleFor(m => m.Rank)
|
|
.NotEmpty().WithMessage("The Rank is required");
|
|
RuleFor(m => m.Specialisation)
|
|
.NotEmpty().WithMessage("The Specialisation is required");
|
|
}
|
|
}
|
|
}
|