anchor.diff:         :initform (string (gensym))
          :documentation "The form id")
      (name :initarg :name
  -	 :accessor form-name
  -	 :initform (error "Provide a name for the form")
  -	 :documentation "The form name")
  +         :accessor form-name
  +         :initform (error "Provide a name for the form")
  +         :documentation "The form name")
      (action :initarg :action
  -	   :initform nil
  -	   :accessor form-action
  -	   :documentation "The form action")
  +           :initform nil
  +           :accessor form-action
  +           :documentation "The form action")
      (method :initarg :method
  -	   :initform :post
  -	   :accessor form-method
  -	   :documentation "The form method")
  +           :initform :post
  +           :accessor form-method
  +           :documentation "The form method")
      (fields :initarg :fields
  -	   :initform nil
  -	   :accessor form-fields
  -	   :documentation "Form fields")
  +           :initform nil
  +           :accessor form-fields
  +           :documentation "Form fields")
      (model :initarg :model
  -	  :initform nil
  -	  :accessor form-model
  -	  :documentation "The form model object")
  -   (csrf-protection :initarg :csrf-protection-p
  -		    :initform t
  -		    :accessor form-csrf-protection-p
  -		    :documentation "T when csrf protection is enabled")
  +          :initform nil
  +          :accessor form-model
  +          :documentation "The form model object")
  +   (csrf-protection :initarg :csrf-protection
  +                    :initform nil
  +                    :accessor form-csrf-protection-p
  +                    :documentation "T when csrf protection is enabled")
      (csrf-field-name :initarg :csrf-field-name
  -		    :initform "_token"
  -		    :accessor form-csrf-field-name
  -		    :documentation "csrf field name")
  +                    :initform "_token"
  +                    :accessor form-csrf-field-name
  +                    :documentation "csrf field name")
      (errors :initform nil
  -	   :accessor form-errors
  -	   :documentation "Form errors after validation")
  +           :accessor form-errors
  +           :documentation "Form errors after validation")
      (client-validation :initarg :client-validation
  -		      :initform t
  -		      :accessor client-validation
  -		      :documentation "When T, form client validation is enabled"))	    
  +                      :initform t
  +                      :accessor client-validation
  +                      :documentation "When T, form client validation is enabled"))
     (:documentation "A form"))
   
   (defmethod print-object ((form form) stream)
     (print-unreadable-object (form stream :type t :identity t)
       (format stream "~A~@{ ~A~}"
  -	    (form-name form)
  -	    (form-action form))))
  +            (form-name form)
  +            (form-action form))))
   
   (defmethod initialize-instance :after ((form form) &rest initargs)
     (loop for field in (form-fields form)
  
positive.code: ;;;; cl-forms.lisp
  
  (in-package #:cl-forms)
  
  (defvar *form-renderer* nil)
  
negative.code: (defmethod field-value ((field form-field))
    (if (field-accessor field)
        (funcall (fdefinition (field-accessor field))
                 (form-model (field-form field)))
        (slot-value field 'value)))
  
  (defmethod (setf field-value) (value (field form-field))
    (if (field-accessor field)
        (funcall (fdefinition `(setf ,(field-accessor field)))
                 value
                 (form-model (field-form field)))
        (setf (slot-value field 'value) value)))
  
  (defgeneric validate-form-field (form-field))
  
  (defmethod validate-form-field :around ((form-field form-field))
    (cond
      ((and (field-required-p form-field)
            (null (field-value form-field)))
       (values nil
               (list (format nil "~A is required" (field-name form-field)))))
      ((and (not (field-required-p form-field))
            (null (field-value form-field)))
       (values t nil))
      (t (call-next-method))))
  
  (defmethod validate-form-field ((form-field form-field))
    (let ((errors nil))
      (loop for constraint in (field-constraints form-field)
         do
           (multiple-value-bind (valid-p error-msg)
               (funcall constraint
                        (field-value form-field))
             (when (not valid-p)
               (push error-msg errors))))
      (values (not errors)
              errors)))
  
  (defmethod form-session-csrf-entry ((form form))
    (alexandria:make-keyword (format nil "~A-CSRF-TOKEN" (form-name form))))
  