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

namespace Hotline.Validators.Exams
{
    public class AddQuestionSourcewareDtoValidator:AbstractValidator<AddQuestionSourcewareDto>
    {
        public AddQuestionSourcewareDtoValidator()
        {
            RuleFor(m => m.SourcewareId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourceware).GetDescription()));
            //RuleFor(m => m.QuestionId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamQuestionBak).GetDescription()));

        }
    }
}
