using FluentValidation; namespace Indotalent.Features.Leave.LeaveBalance.Cqrs; public class UpdateLeaveBalanceValidator : AbstractValidator { public UpdateLeaveBalanceValidator() { RuleFor(x => x.Id).NotEmpty().WithMessage("ID is required for update"); RuleFor(x => x.EmployeeId).NotEmpty().WithMessage("Employee is required"); RuleFor(x => x.LeaveCategoryId).NotEmpty().WithMessage("Leave Category is required"); RuleFor(x => x.Year).GreaterThan(2000); RuleFor(x => x.Entitlement).GreaterThanOrEqualTo(0); } }