using FluentValidation;
using OnlineAssessment.Domain.ViewModels;

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

    public class CategoryEditModelValidator : AbstractValidator<CategoryEditModel>
    {
        public CategoryEditModelValidator()
        {

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