View source: R/validate_property.R
validate_property | R Documentation |
Validates a property to ensure it matches the expected type or satisfies the given validation function.
validate_property(name, value, validator)
name |
The name of the property being validated. |
value |
The value of the property. |
validator |
The expected type or a custom validation function. |
This function supports various types of validators: - Enum generators - Lists of multiple allowed types - Interface objects - Built-in R types (character, numeric, logical, integer, double, complex) - data.table and data.frame types - Custom validation functions
Returns NULL if the validation passes, otherwise returns a character string containing an error message describing why the validation failed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.