Initial commit - MetaCourse API

This commit is contained in:
2026-05-28 13:45:03 +00:00
commit 0f97b7d85c
79 changed files with 3334 additions and 0 deletions
@@ -0,0 +1,23 @@
using FastEndpoints;
using FluentValidation;
using MetaCourse.Api.DTOs.Courses;
namespace MetaCourse.Api.Validators.Courses;
public class UpdateCourseDtoValidator : Validator<UpdateCourseDto>
{
public UpdateCourseDtoValidator()
{
RuleFor(x => x.Id)
.NotEqual(Guid.Empty).WithMessage("L'identifiant est invalide.");
RuleFor(x => x.Title)
.NotEmpty().WithMessage("Le titre est requis.")
.MinimumLength(3).WithMessage("Le titre doit contenir au moins 3 caractères.")
.MaximumLength(200).WithMessage("Le titre ne peut pas dépasser 200 caractères.");
RuleFor(x => x.Description)
.NotEmpty().WithMessage("La description est requise.")
.MaximumLength(2000).WithMessage("La description ne peut pas dépasser 2000 caractères.");
}
}