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 AddSourcewareDtoValidator:AbstractValidator<AddSourcewareDto>
    {
        public AddSourcewareDtoValidator()
        {
            RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
        }
    }
}
