using FluentValidation;

using Monitoring.Core.Domain.OrganizationManagement;

namespace Monitoring.Features.Organizations.CreateOrganization;

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

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