diff --git a/BeReadyBackend/Validators/Messages/CreateMessageDtoValidator.cs b/BeReadyBackend/Validators/Messages/CreateMessageDtoValidator.cs index 3b95c60..2d29f8f 100644 --- a/BeReadyBackend/Validators/Messages/CreateMessageDtoValidator.cs +++ b/BeReadyBackend/Validators/Messages/CreateMessageDtoValidator.cs @@ -22,6 +22,8 @@ public class CreateMessageDtoValidator : Validator RuleFor(x => x.GroupId) .NotEmpty() - .WithMessage("GroupId is required"); + .WithMessage("GroupId is required") + .GreaterThan(0) + .WithMessage("GroupId must be greater than 0"); } } \ No newline at end of file