Skip to content

verify ​

Zod-check form YAML against the gform schema. Same validation layer gform run uses before opening a browser.

verify one form ​

bash
gform verify <form>
gform verify ./forms/<form>.yaml
gform ver <form>                    # short alias

Prints success with the resolved path, or an error with the schema failure reason. Exit code 1 on failure.

verify entire library ​

bash
gform verify

Omit the target to check every form in $GFORM_HOME/forms/. Useful after bulk edits or before a release.

bash
gform verify --forms-dir ./forms     # check forms under a custom root

live sync: --check ​

Offline verify does not open a browser and does not accept --auth. To re-inspect the live form and safely patch the local YAML:

bash
gform verify <form> --check              # inspect (public HTML)
gform verify <form> --check -A           # auth session (file-upload / login-walled)
gform ver <form> --check -A -y           # apply without confirm
FlagRole
--checkLive inspect → diff → propose YAML updates
-y / --yesApply without confirm (required non-TTY / CI)
-A / --auth, --profileOnly with --check — same as inspect / run

Safe merge only:

  • Widen file-step accept from live categories when parse finds them (union) — never narrow a richer YAML list
  • Fill missing maxBytes / maxFiles from live respondent hints (Upload N … Max N MB — per file; form-wide Drive quota is separate)
  • Append stub steps for new live questions (placeholders; existing answers untouched)
  • Warn on YAML steps with no live match (removed/renamed) — never auto-delete

Live accept/size need a hydrated page (verify --check -A / inspect -A). Static FB often omits them. When live hints exist, --check can refresh YAML; when missing, your hand-set accept stays.

Does not rewrite filled answers, pools, or source: blocks.

when to run verify ​

momentwhy
after gform init or hand-editing YAMLcatch typos before run
after the owner changes file types on the formverify --check refreshes accept
in CI / pre-commitblock broken configs (verify offline; use -y if you automate --check)
after gform restoreconfirm snapshot is still valid
before gform addadd runs verify internally, but explicit check is faster

what it checks (offline) ​

  • required fields (name, url, steps)
  • step action types and shapes (including file source.type local|gdrive|remote)
  • option types and ranges
  • pool / unique field syntax
  • file content gates when a local/remote source is set (mime / maxBytes); gdrive is not downloaded — tip points at gform run <form> --auth

It does not check whether answers match live form questions unless you pass --check. File behavior map: file-uploads.

gotchas ​

  • Name lookup follows the same path as run (cwd ./forms/ then library). See portable.md.
  • gform verify with no forms installed prints "Nothing to verify." and exits 0.
  • gform verify <form> -A errors — auth is not an offline verify flag; use --check -A or gform run … --auth.
  • Fixing verify errors in a library form does not require gform add again — you're editing in place.

Named run-policy CRUD under $GFORM_HOME/policies/ (gform policies|pol) is planned separately — not part of verify.