View source: R/utils-validation.R
Given some data and required fields, will check to ensure that the supplied data is not null or empty and has all required fields. Will throw an error if either of these checks fail. Returns TRUE if the retrieved data is valid with all required fields, returns false otherwise.
1 2 |
data |
the data to check the validity of |
name |
the name to use for the data when logging errors |
requiredFields |
a list of the required fields for this data to be valid |
stopNull |
(optional - default = TRUE) whether or not the function should throw an error if the data is NULL. |
stopMissing |
(optional - default = TRUE) whether or not the function should throw an error if the data is missing some required fields. |
stopEmpty |
(optional - default = TRUE) whether or not the function should throw an error if the data is present but empty. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.