Centralized parameter validation to reduce code duplication
validate_param(
value,
arg_name,
type = "character",
min_length = 1,
max_length = Inf,
allow_na = FALSE,
choices = NULL
)The value to validate
The argument name for error messages
Expected type: "character", "logical", "numeric"
Minimum length for vectors
Maximum length for vectors
Whether NA values are allowed
Valid choices for character parameters