diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.lisp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.lisp b/src/main.lisp index 27afeda..26df348 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -519,9 +519,11 @@ have exceeded the invite limit." "On success, return an object containing a new [invite token](#invite-token)." (to-json (make-new-invite (api-contributor token)))) +(defparameter +explanation-wordcount-limit+ 550) + (defun validate-new-oneliner-plist (plist) (with-plist - (oneliner tags brief runstyle) plist + (oneliner tags brief runstyle explanation) plist (unless tags (http-err 400 "A oneliner requires tags")) (unless brief @@ -530,6 +532,9 @@ have exceeded the invite limit." (http-err 400 "Brief description is too long. Limit to 75 characters")) (unless oneliner (http-err 400 "Oneliner cannot be blank")) + (when explanation + (unless (<= (count #\space explanation) +explanation-wordcount-limit+) + (http-err 400 "Explanation is too long. Limit to around 500 words."))) (when runstyle (setf runstyle (a:make-keyword runstyle)) (unless (typep runstyle 'runstyle) |