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

namespace Hotline.Validators.Exams
{
    public class UpdateQuestionKnowladgeDtoValidator:AbstractValidator<UpdateQuestionKnowladgeDto>
    {
        public UpdateQuestionKnowladgeDtoValidator()
        {
            RuleFor(m => m.KnowladgeId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(Hotline.KnowledgeBase.Knowledge).GetDescription()));
            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Id))));
        }
    }
}
