diff --git a/forum.nim b/forum.nim index 9427fe3..e657a93 100644 --- a/forum.nim +++ b/forum.nim @@ -462,6 +462,10 @@ template retrContent(c: expr) = let content {.inject.} = c.req.params["content"] if content.strip.len < 10: return setError(c, "content", "Content not long enough") + # Enforce DB content length for posts + elif content.len > 1000: + return setError(c, "content", "Post length too long") + if not validateRst(c, content): return false template retrPost(c: expr) =