22 lines
648 B
C#
22 lines
648 B
C#
using FluentValidation;
|
|
using Microsoft.Extensions.Logging;
|
|
using QRCodeService.Application.Commands;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace QRCodeService.Application.Validations
|
|
{
|
|
public class CreateLinkCommandValidator: AbstractValidator<CreateLinkCommand>
|
|
{
|
|
public CreateLinkCommandValidator(ILogger<CreateLinkCommandValidator> logger)
|
|
{
|
|
RuleFor(link=>link.SuffixUrl).NotEmpty().WithMessage("No SuffixUrl found");
|
|
|
|
logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name);
|
|
}
|
|
}
|
|
}
|