14 lines
405 B
C#
14 lines
405 B
C#
using FluentValidation;
|
|
using ldap_cesi.DTOs.Inputs.Service;
|
|
|
|
namespace ldap_cesi.Validator.Service;
|
|
|
|
public class ServiceCreateValidator : AbstractValidator<ServiceCreateDto>
|
|
{
|
|
public ServiceCreateValidator()
|
|
{
|
|
RuleFor(x => x.Nom)
|
|
.NotEmpty().WithMessage("Le nom est requis.")
|
|
.MaximumLength(50).WithMessage("Le nom ne doit pas dépasser 50 caractères.");
|
|
}
|
|
} |