using Exam.Infrastructure.Extensions;
using FluentValidation;
using Hotline.Exams.Sourcewares;
using Hotline.Exams.Validate;
using Hotline.Share.Dtos.Sourcewares;

namespace Hotline.Validators.Exams
{
    public class UpdateSourcewareDtoValidator:AbstractValidator<UpdateSourcewareDto>
    {
        public UpdateSourcewareDtoValidator()
        {
            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Id))));
            RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
        }
    }
}
