feat(post-form): require 1–6 photos per entry
Raise the FilePond limit from 4 to 6 and enforce a minimum of one photo. The photo field is first in the form, so initValidation checks it first: an empty picker blocks submit, reveals the (possibly collapsed) photo section, and shows "Add at least one photo." under its header. Labels updated to "Photos (1–6)". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ form:
|
||||
# bar so the thumbnails don't crowd the writing area.
|
||||
-
|
||||
name: photos
|
||||
label: Photos (max 4)
|
||||
label: Photos (1–6)
|
||||
# Grav-managed filepond field. post-form.js hooks its beforeAddFile
|
||||
# to convert HEIC->JPEG in the browser, then re-adds the JPEG via the
|
||||
# public pond.addFile() API — FilePond keeps ownership of the upload
|
||||
@@ -32,7 +32,9 @@ form:
|
||||
type: filepond
|
||||
multiple: true
|
||||
destination: '@self'
|
||||
limit: 4
|
||||
# Max 6 photos per entry; at least 1 is required (enforced
|
||||
# client-side in post-form.js initValidation).
|
||||
limit: 6
|
||||
accept:
|
||||
- 'image/*'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user