using FluentValidation;

using Monitoring.Core.Domain.OrganizationManagement;

namespace Monitoring.Features.Organizations.UpdateOrganization;

public class UpdateOrganizationValidator : AbstractValidator<UpdateOrganizationRequest>
{
	public UpdateOrganizationValidator()
	{
		_ = RuleFor(x => x.Name).NotEmpty()
			.MinimumLength(OrganizationName.MinLength)
			.MaximumLength(OrganizationName.MaxLength);

		_ = RuleFor(x => x.Description).NotEmpty()
			.MinimumLength(OrganizationDescription.MinLength)
			.MaximumLength(OrganizationDescription.MaxLength);
	}
}
