[Add minimal captcha field to comment form
clinton@unknownlamer.org**20090417181617
 Ignore-this: 26ef240ea832bb813cac8c656017874
 This seems to work for cliki so here's to hoping it does for me
] hunk ./src/frontend-weblog.lisp 45
+(defclass captcha-validator (validator)
+  ())
+
+(defclass captcha-field (string-field)
+  ((captcha-text :initarg :captcha :accessor captcha-text))
+  (:default-initargs :validators (make-validators 'captcha-validator)))
+
+(defmethod validate ((field captcha-field) (validator captcha-validator))
+  (string= (captcha-text field) (or (value field) "")))
+
+(defmethod render :after ((field captcha-field))
+  (<:span :class "captcha-field-message"
+	  "Prove you are a human (type "
+	  (<:tt :class "captcha-text" (<:ah (captcha-text field)))
+	  " here)"))
+
hunk ./src/frontend-weblog.lisp 66
+   (captcha (captcha-field :input-size 10
+			   :captcha "lisp"))