using FluentValidation;
using OnlineAssessment.Domain.ViewModels;

namespace OnlineAssessment.Validators
{
    public class TagAddModelValidator : AbstractValidator<TagAddModel>
    {
        public TagAddModelValidator()
        {
            RuleFor(c => c.name)
               .NotEmpty()
               .NotNull()
               .MaximumLength(500);


        }
    }

    public class TagEditModelValidator : AbstractValidator<TagEditModel>
    {
        public TagEditModelValidator()
        {
            RuleFor(c => c.Id)
               .NotEmpty()
               .NotNull()
               .GreaterThan(0);

          
            RuleFor(c => c.name)
               .NotEmpty()
               .NotNull()
               .MaximumLength(500);

        }
    }
}
