Skip to content

validate form reads a saved Form; - reads the Form's JSON from standard input. It checks structural validity and internal consistency, not Policy compliance or live cloud state.

Usage

rootform validate form <file> [options]
SHELL

Options

FlagTypeDefaultDescription
--formatstring""output format: text|json; default: text

Global options

FlagTypeDefaultDescription
-h, --helpboolfalseshow how to use rootform validate form
--colormodeautocolor human output: auto|always|never; default: auto
--no-pagerboolfalseprint a long report in full instead of opening it in less

From a checkout of the repository, save the reviewed commerce plan as a Form, then validate that the saved Form is structurally valid. Validation does not reanalyze the plan or evaluate Policies.

rootform run examples/playground/commerce-platform/head/plan.json \
--plan-file examples/playground/commerce-platform/head/plan.tfplan \
--no-serve -o analysis.json
rootform validate form analysis.json --color always
rootform validate form analysis.json --format json
Shell
Validation result OUTPUT
Form valid

Text is the default result; JSON is also available. The result goes to standard output and diagnostics to standard error. Status 0 means the Form is valid; 1 means it is not valid; 2 means incorrect usage; 3 means the input was refused; 4 means the input could not be read or the report could not be written. Use check to evaluate Policies and Forms for what a Form contains.