using FluentValidation;

namespace Baya.Application.Features.Bookings.Commands.SubmitCareInstructions;

public sealed class SubmitCareInstructionsCommandValidator : AbstractValidator<SubmitCareInstructionsCommand>
{
    public SubmitCareInstructionsCommandValidator()
    {
        RuleFor(x => x.CurrentConditions).MaximumLength(2000);
        RuleFor(x => x.Medications).MaximumLength(2000);
        RuleFor(x => x.Allergies).MaximumLength(2000);
        RuleFor(x => x.SpecialInstructions).MaximumLength(2000);
        RuleFor(x => x.EmergencyContactName).MaximumLength(200);
        RuleFor(x => x.EmergencyContactPhone).MaximumLength(30);

        // The booking id is route-supplied, so it is not validated in the body.
    }
}
