Checks the comment request bodies, for the comment routes to answer a 400.
f
isCreateCommentRequest(obj: unknown): obj is CreateCommentRequest
Checks whether obj is a CreateCommentRequest whose body isn't
blank and fits VALIDATION.COMMENT_BODY_MAX. A null parentId passes, as a
top-level comment.
f
isUpdateCommentRequest(obj: unknown): obj is UpdateCommentRequest
Checks whether obj is an UpdateCommentRequest whose body isn't
blank and fits VALIDATION.COMMENT_BODY_MAX.
Usage
import * as mod from "api/validators/comment.ts";