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 AddQuestionOptionsDtoValidator:AbstractValidator<AddQuestionOptionsDto>
    {
        public AddQuestionOptionsDtoValidator()
        {
            RuleFor(m => m.Content).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestionOptions))));
        }
    }
}
