Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	Knots/obj/Debug/net8.0/Knots.AssemblyInfo.cs
#	Knots/obj/Debug/net8.0/Knots.AssemblyInfoInputs.cache
#	Knots/obj/rider.project.model.nuget.info
This commit is contained in:
oistig
2026-03-19 16:19:07 +01:00
7 changed files with 59 additions and 11 deletions

View File

@@ -1,6 +1,23 @@
using FastEndpoints;
using FluentValidation;
using Knots.DTO.Message;
namespace Knots.Validators.Message; namespace Knots.Validators.Message;
public class CreateMessageDtoValidator public class CreateMessageDtoValidator : Validator<CreateMessageDto>
{ {
public CreateMessageDtoValidator()
{
RuleFor(x => x.Contenu)
.NotEmpty()
.WithMessage("Le message ne peux pas être vide")
.MaximumLength(1000)
.WithMessage("Le message ne doit pas faire plus de 1000 caractères");
RuleFor(x => x.Date)
.NotEmpty()
.WithMessage("La date ne peut pas être vide");
}
} }

View File

@@ -1,6 +1,17 @@
using FastEndpoints;
using FluentValidation;
using Knots.DTO.Role;
namespace Knots.Validators.Role; namespace Knots.Validators.Role;
public class CreateRoleDtoValidator public class CreateRoleDtoValidator : Validator<CreateRoleDto>
{ {
public CreateRoleDtoValidator()
{
RuleFor(x => x.Libelle)
.NotEmpty()
.WithMessage("Libelle cannot be empty")
.MaximumLength(50)
.WithMessage("Libelle maximum length is 50");
}
} }

View File

@@ -1,6 +1,15 @@
using FastEndpoints;
using FluentValidation;
using Knots.DTO.Role;
namespace Knots.Validators.Role; namespace Knots.Validators.Role;
public class DeleteRoleDtoValidator public class DeleteRoleDtoValidator : Validator<DeleteRoleDto>
{ {
public DeleteRoleDtoValidator()
{
RuleFor(x => x.Id)
.NotEmpty()
.WithMessage("Id cannot be empty");
}
} }

View File

@@ -1,6 +1,17 @@
using FastEndpoints;
using FluentValidation;
using Knots.DTO.Role;
namespace Knots.Validators.Role; namespace Knots.Validators.Role;
public class GetRoleDtoValidator public class GetRoleDtoValidator : Validator<GetRoleDto>
{ {
public GetRoleDtoValidator()
{
RuleFor(x => x.Libelle)
.NotEmpty()
.WithMessage("Libelle cannot be empty")
.MaximumLength(50)
.WithMessage("Libelle maximum length is 50");
}
} }

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Knots")] [assembly: System.Reflection.AssemblyCompanyAttribute("Knots")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+dc9aa8c840b4064bd32793b90b273caaf36c360f")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+3a833724031a4e7076b11dcb48bd7aa2c7376432")]
[assembly: System.Reflection.AssemblyProductAttribute("Knots")] [assembly: System.Reflection.AssemblyProductAttribute("Knots")]
[assembly: System.Reflection.AssemblyTitleAttribute("Knots")] [assembly: System.Reflection.AssemblyTitleAttribute("Knots")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
1b8ae9dfe4e2b2618cd70cfa49fe9679d0b7d9b1c2eb5ae991b2036ea16d6dfd ea906d69ee00ac134acfca751c691f6f874ba5373dc51f1200fce206bc66abe5

View File

@@ -1 +1 @@
17733319213920905 17733307741808199