using Exam.Infrastructure.Extensions;
using FluentValidation;
using FluentValidation.Validators;
using Hotline.Exams.Questions;
using Hotline.Exams.TestPapers;
using Hotline.Exams.Validate;
using Hotline.Share.Dtos.TestPapers;

namespace Hotline.Validators.Exams.TestPapers
{
    public class UpdateTestPaperItemDtoValidator : AbstractValidator<UpdateTestPaperItemDto>
    {
        public UpdateTestPaperItemDtoValidator()
        {
            RuleFor(m => m.QuestionId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamQuestion).GetDescription()));
        }
    }
}