using Exam.Infrastructure.Extensions;
using FluentValidation;
using Hotline.Exams.Sourcewares;
using Hotline.Share.Dtos.Sourcewares;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Exams.Validate;

namespace Hotline.Validators.Exams
{
    public class UpdateSourceCategoryDtoValidator:AbstractValidator<UpdateSourcewareCategoryDto>
    {
        public UpdateSourceCategoryDtoValidator()
        {
            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Id))));
            RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Name))));
        }
    }
}
