Commits

Luke Plant  committed 7baf4c2

Made 'name' not a required field for comment

  • Participants
  • Parent commits 628346c

Comments (0)

Files changed (1)

File src/Blog/Forms.hs

     do
     -- TODO - protect name -- some names are reversed for logged in users.
     -- TODO - posts that are closed for comments
-    -- TODO - actual validation on fields
     -- TODO - addCommentToPost utility
+    -- TODO - nicer mechanism for validation
       ts <- epochTime
       let text = postedData "message" `captureOrDefault` ""
       let name = postedData "name" `captureOrDefault` ""
       let errors = (if null text
                    then ["'Message' is a required field."]
                    else [])
-                   ++
-                   (if null name
-                   then ["'Name' is a required field."]
-                   else [])
       let format = Plaintext
 
       return (Cm.Comment {