using FluentValidation;

using Monitoring.Core.Domain.UserLogManagement;

namespace Monitoring.Features.UserLogs.CreateLog;

public class CreateLogValidator : AbstractValidator<CreateLogRequest>
{
	public CreateLogValidator()
	{
		_ = RuleFor(x => x.AssetId)
			.NotEmpty();

		_ = RuleFor(x => x.Message)
			.NotEmpty()
			.MinimumLength(UserLogInformation.MinLength)
			.MaximumLength(UserLogInformation.MaxLength);
	}
}