View source: R/params-prelude-generated.R
| apply_choice_rules | R Documentation |
Validates the elements of a named list x against per-field
checkmate::testChoice() choice sets. Fields whose names are not in rules
are skipped. On failure, returns an error string naming the first offending
element and appending an optional hint.
apply_choice_rules(x, rules, label, hint = NULL)
x |
Named list of parameters to validate. |
rules |
Named list mapping field name to the character vector of allowed choices. |
label |
Short human-readable label used in the error message
(e.g. |
hint |
Optional string appended to the error message. Defaults to
|
TRUE if all checked fields pass, otherwise a string naming the
first offending element.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.