diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs index b8926f13..f18cc446 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/Forum/CommentService.cs @@ -136,9 +136,9 @@ namespace Yi.Framework.Bbs.Application.Services.Forum [Authorize] public override async Task CreateAsync(CommentCreateInputVo input) { - if (input.Content.Length<=6) + if (string.IsNullOrWhiteSpace(input.Content)|| input.Content=="


") { - throw new UserFriendlyException("评论长度至少大于6"); + throw new UserFriendlyException("评论不能为空"); } var discuess = await _discussRepository.GetFirstAsync(x => x.Id == input.DiscussId);