check_start_end_dates <- function(check, start, end) {
if (anyNA(start, end)) {
# Ensure start and end are both valid dates
ArgumentCheck::addError(
msg = "'start' and/or 'end' not valid date formats",
argcheck = check
)
} else {
# Ensure start < end
if (start > end) {
ArgumentCheck::addError(
msg = "'start' > 'end'. 'start' must be <= 'end'",
argcheck = check
)
}
}
return(check)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.