using FluentValidation;
using OnlineAssessment.Domain.ViewModels;

namespace OnlineAssessment.Validators
{
    public class ClassAddModelValidator : AbstractValidator<ClassAddModel>
    {
        public ClassAddModelValidator()
        {

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

    public class ClassEditModelValidator : AbstractValidator<ClassEditModel>
    {
        public ClassEditModelValidator()
        {
            RuleFor(c => c.name)
               .NotEmpty()
               .NotNull()
               .MaximumLength(500);
        }
    }
}
