Check a form definition
Arguments
- definition
Named list following
form_schema(); sequences are unnamed lists.- resource
Source label for diagnostics.
Value
A form_model_check with valid and a diagnostics data frame
containing resource, path and message columns.
Details
Checks schema structure, then model consistency if structure passes.
Invalid definitions return diagnostics; invalid arguments raise model_form_error.
Submitted data is not checked.
Examples
model <- read_form_model("examples/survey-form.yaml", "form.model")
check_form_model(form_definition(model))
#> <form_model_check> valid