Can be used to check individual strings, or vectors of strings.
Arguments
- values
A character vector of strings to check
- type
A character string specifying the type of values being checked, one of "location-code", "column-name", "column-label" or "column-item".
- verbose
Logical, if TRUE prints feedback messages to console for every test, if FALSE run silently
- stop_on_error
Logical, if TRUE will stop with an error if the result is "FAIL", and will throw genuine warning if result is "WARNING"
Examples
check_api_char_limit(names(example_data), "column-name")
#> check result
#> 1 check_api_char_limit_column-name PASS
#> message
#> 1 All filter / indicator names are less than or equal to the character limit of 50.
#> guidance_url
#> 1 NA
check_api_char_limit(names(example_data), "column-name", verbose = TRUE)
#> ✔ All filter / indicator names are less than or equal to the character limit of 50.
#> check result
#> 1 check_api_char_limit_column-name PASS
#> message
#> 1 All filter / indicator names are less than or equal to the character limit of 50.
#> guidance_url
#> 1 NA