﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation;
using SOURCE.EspaceCandidature.Web.ViewModels.Pages.Candidature.Candidature.Details;

namespace SOURCE.EspaceCandidature.Web.ViewModels.Validators.Candidature.Candidature.Details
{
    public class FormationsContinuesViewModelValidator : AbstractValidator<FormationsContinuesViewModel>
    {
        public FormationsContinuesViewModelValidator() 
        {
            RuleFor(x => x.CandidatureID).NotEmpty().WithMessage("CANDIDATURE_OBLIGATOIRE");

            RuleFor(x => x.Formations).SetCollectionValidator(new FormationContinueViewModelValidator());
        }
    }
}
