Files
CleanArchitecture/CleanArchitecture/CleanArchitecture.Application/Features/Videos/Commands/UpdateVideo/UpdateStreamerCommandValidator.cs
Alejandro Sarmiento 81a3e91d6e Video 76
Se hizo toda la parte del Unit Of Work y estoy a punto de terminar la de tests unitarios
2024-02-28 22:40:34 +01:00

22 lines
656 B
C#

using FluentValidation;
namespace CleanArchitecture.Application.Features.Videos.Commands.UpdateVideo
{
public class UpdateVideoCommandValidator: AbstractValidator<UpdateVideoCommand>
{
public UpdateVideoCommandValidator()
{
RuleFor(x=>x.Nombre)
.NotEmpty().WithMessage("{Nombre} is required.")
.NotNull()
.MaximumLength(50).WithMessage("{Nombre} must not exceed 50 characters.");
RuleFor(x => x.Id)
.NotEmpty().WithMessage("{Id} is required.")
.NotNull();
}
}
}