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

namespace Hotline.Validators.Exams.Questions
{
    public class UpdateQuestionSourcewareDtoValidator:AbstractValidator<UpdateQuestionSourcewareDto>
    {
        public UpdateQuestionSourcewareDtoValidator()
        {
            RuleFor(m => m.SourcewareId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourceware).GetDescription()));
        }
    }
}
