verify
Zod-check form YAML against the gform schema. Same validation layer gform run uses before opening a browser.
verify one form
gform verify <form>
gform verify ./forms/<form>.yaml
gform ver <form> # short aliasPrints success with the resolved path, or an error with the schema failure reason. Exit code 1 on failure.
verify entire library
gform verifyOmit the target to check every form in $GFORM_HOME/forms/. Useful after bulk edits or before a release.
gform verify --forms-dir ./forms # check forms under a custom rootlive 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:
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| Flag | Role |
|---|---|
--check | Live inspect → diff → propose YAML updates |
-y / --yes | Apply without confirm (required non-TTY / CI) |
-A / --auth, --profile | Only with --check — same as inspect / run |
Safe merge only:
- Widen file-step
acceptfrom live categories when parse finds them (union) — never narrow a richer YAML list - Fill missing
maxBytes/maxFilesfrom 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
| moment | why |
|---|---|
after gform init or hand-editing YAML | catch typos before run |
| after the owner changes file types on the form | verify --check refreshes accept |
| in CI / pre-commit | block broken configs (verify offline; use -y if you automate --check) |
after gform restore | confirm snapshot is still valid |
before gform add | add runs verify internally, but explicit check is faster |
what it checks (offline)
- required fields (
name,url,steps) - step action types and shapes (including
filesource.typelocal|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 atgform 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 verifywith no forms installed prints "Nothing to verify." and exits 0.gform verify <form> -Aerrors — auth is not an offline verify flag; use--check -Aorgform run … --auth.- Fixing verify errors in a library form does not require
gform addagain — you're editing in place.
related
- inspect.md — live metadata and risk flags (no YAML write)
- file-uploads.md — file source / assist / Drive / accept tokens
- add.md — install after verify passes
- run.md — execute
- edit.md — fix schema issues
Named run-policy CRUD under
$GFORM_HOME/policies/(gform policies|pol) is planned separately — not part of verify.