using FluentValidation;
using SportsDivision.Application.DTOs;

namespace SportsDivision.Application.Validators;

public class SchoolCreateValidator : AbstractValidator<SchoolCreateDto>
{
    public SchoolCreateValidator()
    {
        RuleFor(x => x.Name).NotEmpty().MaximumLength(200);
        RuleFor(x => x.ShortName).MaximumLength(20);
        RuleFor(x => x.SchoolLevel).IsInEnum();
        RuleFor(x => x.ZoneId).GreaterThan(0);
    }
}
