 
 (defn event-activity-edit-page [event-id & [activity-id]]
   (let [form (atom {:EventId event-id})
-        validator (validation-set (presence-of     :Name)
-                                  (presence-of     :StartTime)
-                                  (presence-of     :EndTime)
-                                  (numericality-of :EnrollmentCap))
+        validator (validation-set (presence-of :Name)
+                                  (presence-of :StartTime)
+                                  (presence-of :EndTime)
+                                  (format-of :EnrollmentCap :format #"^\d*$"
+                                             :allow-blank true
+                                             :allow-nil true))
         reset-form!
         (fn []
-          (reset! form (atom {:EventId event-id})))]
+          (reset! form {:EventId event-id}))]
     (when activity-id
       (if-let [activity (seq (d/entity @activities-db activity-id))]
         (reset! form (into {} activity))

                             event-id)))

            create-activity
            (fn [form]
              (when (empty? errors)
                (activities-endpoint :create
                                     (let [start-time (:StartTime form)
                                           end-time   (:EndTime form)]

                (r/wrap Description swap! form assoc :Description)]]
              [:button.ui.primary.button {:class (when (seq errors) "disabled")
                                          :type :submit
                                          :on-click #(create-activity % @form)}
               "Add"]]]
            [:div.ui.vertical.segment
             [:h2.ui.header
