using FluentValidation;
using IWS5.Core.Models.Request;

namespace IWS5.Services.Validators;

public class CreateNoteRequestItemValidator : AbstractValidator<CreateNoteRequestItem>
{
    public CreateNoteRequestItemValidator()
    {
        RuleFor(x => x.WorkItemId)
            .GreaterThan(0).WithMessage("WorkItemId must be greater than 0");
        
        RuleFor(x => x.Note)
            .NotEmpty().WithMessage("Note is required.")
            .MaximumLength(1024).WithMessage("Note must not exceed 1024 characters.");
    }
}