level_checks() takes input of a built in validation level or a custom validation level and returns a list with all validation components that level contains.

level_checks(level = eplusr_option("validate_level"))

Arguments

level

Should be one of "none", "draft", "final" or an output of custom_validate().

Value

A named list with nine element, e.g. required_object, unique_object, unique_name, extensible, required_field, autofield, type, choice, range and reference. For the meaning of each validation component, seecustom_validate().

Examples

level_checks("draft")
#> $required_object #> [1] FALSE #> #> $unique_object #> [1] FALSE #> #> $unique_name #> [1] TRUE #> #> $extensible #> [1] FALSE #> #> $required_field #> [1] FALSE #> #> $autofield #> [1] TRUE #> #> $type #> [1] TRUE #> #> $choice #> [1] TRUE #> #> $range #> [1] TRUE #> #> $reference #> [1] FALSE #>
level_checks("final")
#> $required_object #> [1] TRUE #> #> $unique_object #> [1] TRUE #> #> $unique_name #> [1] TRUE #> #> $extensible #> [1] TRUE #> #> $required_field #> [1] TRUE #> #> $autofield #> [1] TRUE #> #> $type #> [1] TRUE #> #> $choice #> [1] TRUE #> #> $range #> [1] TRUE #> #> $reference #> [1] TRUE #>
level_checks(custom_validate(autofield = TRUE))
#> $required_object #> [1] FALSE #> #> $unique_object #> [1] FALSE #> #> $unique_name #> [1] FALSE #> #> $extensible #> [1] FALSE #> #> $required_field #> [1] FALSE #> #> $autofield #> [1] TRUE #> #> $type #> [1] FALSE #> #> $choice #> [1] FALSE #> #> $range #> [1] FALSE #> #> $reference #> [1] FALSE #>
level_checks(eplusr_option("validate_level"))
#> $required_object #> [1] FALSE #> #> $unique_object #> [1] FALSE #> #> $unique_name #> [1] TRUE #> #> $extensible #> [1] FALSE #> #> $required_field #> [1] FALSE #> #> $autofield #> [1] FALSE #> #> $type #> [1] FALSE #> #> $choice #> [1] FALSE #> #> $range #> [1] FALSE #> #> $reference #> [1] FALSE #>