15 lines
492 B
C#
15 lines
492 B
C#
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());
|
|
}
|
|
} |