using FluentValidation;
using Monitoring.Core.Domain.CameraManagement;

namespace Monitoring.Features.Cameras.UpdateCamera;

public class UpdateCameraValidator : AbstractValidator<UpdateCameraRequest>
{
	public UpdateCameraValidator()
	{
		_ = RuleFor(x => x.Name)
			.NotEmpty()
			.MinimumLength(CameraName.MinLength)
			.MaximumLength(CameraName.MaxLength);
		_ = RuleFor(x => x.Address)
			.NotEmpty()
			.MinimumLength(CameraAddress.MinLength)
			.MaximumLength(CameraAddress.MaxLength);
	}
}
