19 lines
605 B
C#
19 lines
605 B
C#
using FluentValidation;
|
|
using Liber_Incantamentum.Application.DTOs.Mage;
|
|
|
|
namespace Liber_Incantamentum.Application.Services.Validations
|
|
{
|
|
public class MageDtoCreateValidator : AbstractValidator<MageDtoCreate>
|
|
{
|
|
public MageDtoCreateValidator()
|
|
{
|
|
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");
|
|
}
|
|
}
|
|
}
|