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

namespace Hotline.Validators.Exams
{
    public class AddExamTagDtoValidator:AbstractValidator<AddExamTagDto>
    {
        public AddExamTagDtoValidator()
        {
            RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTag.Name))));
        }
    }
}
