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

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

        }
    }
}