This commit is contained in:
andrei-mihnea-cerbu
2024-04-08 13:37:58 +03:00
parent 333ad8be09
commit 370bbdedcd
164 changed files with 3915 additions and 161 deletions
@@ -0,0 +1,15 @@
using FluentValidation;
namespace Application.Endpoints.Chats;
public class GetConversationValidator : AbstractValidator<GetConversationDto>
{
public GetConversationValidator()
{
RuleFor(x => x.IdUser1)
.NotEmpty().WithMessage("IdUser1 is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString());
RuleFor(x => x.IdUser2)
.NotEmpty().WithMessage("IdUser2 is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString());
}
}