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

namespace Hotline.Validators.Exams
{
    public class AddQuestionKnowladgeDtoValidator:AbstractValidator<AddQuestionKnowladgeDto>
    {
        public AddQuestionKnowladgeDtoValidator()
        {
            RuleFor(m => m.KnowladgeId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(Hotline.KnowledgeBase.Knowledge).GetDescription()));
            //RuleFor(m => m.QuestionId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamQuestionBak).GetDescription()));
        }
    }
}
