﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation;
using AnnuaireCertifies.BackOffice.Web.ViewModels.Pages.Intervenant.Role.Details;

namespace AnnuaireCertifies.BackOffice.Web.ViewModels.Validators.Intervenant.Role.Details.Restrictions
{
    public class ExclusionViewModelValidator : AbstractValidator<ExclusionViewModel>
    {
        public ExclusionViewModelValidator() 
        {
            RuleFor(x => x.DateDebut).NotEmpty().WithMessage("EXCLUSION_DATE_DEBUT_OBLIGATOIRE");
            RuleFor(x => x.DateFin).NotEmpty().WithMessage("EXCLUSION_DATE_FIN_OBLIGATOIRE");
            RuleFor(x => x.IntervenantRoleID).NotEmpty().WithMessage("EXCLUSION_INTERVENANT_ROLE_OBLIGATOIRE");
            RuleFor(x => x.OrganismeID).NotEmpty().WithMessage("EXCLUSION_STRUCTURE_OBLIGATOIRE");
            RuleFor(x => x.Commentaire).NotEmpty().WithMessage("EXCLUSION_OBJETS_MOTIVATIONS_OBLIGATOIRE");
        }
    }
}
