feat: [CODE-1788]: code comment block must start and end on the same side (#2053)

This commit is contained in:
Marko Gaćeša 2024-05-22 15:42:47 +00:00 committed by Harness
parent f66bfa153f
commit 0d1e536531

View File

@ -78,6 +78,10 @@ func (in *CommentCreateInput) Validate() error {
return usererror.BadRequest("code comments require line numbers")
}
if in.LineStartNew && !in.LineEndNew || !in.LineStartNew && in.LineEndNew {
return usererror.BadRequest("code block must start and end on the same side")
}
return nil
}