Describe a configuration field
field_spec(
default = NULL,
type = NULL,
nullable = TRUE,
choices = NULL,
min = NULL,
max = NULL,
validator = NULL
)Default value for the field. Use required() for
fields that must be explicitly provided and have no sensible default.
Character vector. Accepted R types (e.g. "character", "logical").
Logical. Is NULL a valid value? Defaults to TRUE.
Vector. If provided, the value must belong to this set.
Numeric. Minimum allowed value (for numeric types).
Numeric. Maximum allowed value (for numeric types).
Function. Custom validation: function(val) returns TRUE if valid, or a character error message otherwise.
A list of class "field_spec"