Constructor for standardized validation result objects used throughout the FB4 validation system.
Arguments
- valid
Logical indicating if validation passed
- errors
Character vector of error messages
- warnings
Character vector of warning messages
- info
Character vector of info messages
- level
Validation level ("core", "structure", "parameter", etc.)
- category
Optional category being validated
- checked_items
List of items that were checked
Value
An object of class fb4_validation: a named list with eight
elements: valid (logical), errors (character vector of
error messages), warnings (character vector of warning messages),
info (character vector of informational messages), level
(character, validation tier), category (character or NULL),
checked_items (list of items examined), and timestamp
(POSIXct).
Examples
validation_result(valid = TRUE)
#> $valid
#> [1] TRUE
#>
#> $errors
#> character(0)
#>
#> $warnings
#> character(0)
#>
#> $info
#> character(0)
#>
#> $level
#> [1] "core"
#>
#> $category
#> NULL
#>
#> $checked_items
#> list()
#>
#> $timestamp
#> [1] "2026-06-10 23:21:09 -04"
#>
#> attr(,"class")
#> [1] "fb4_validation"
validation_result(valid = FALSE, errors = "weight must be positive",
level = "parameter")
#> $valid
#> [1] FALSE
#>
#> $errors
#> [1] "weight must be positive"
#>
#> $warnings
#> character(0)
#>
#> $info
#> character(0)
#>
#> $level
#> [1] "parameter"
#>
#> $category
#> NULL
#>
#> $checked_items
#> list()
#>
#> $timestamp
#> [1] "2026-06-10 23:21:09 -04"
#>
#> attr(,"class")
#> [1] "fb4_validation"
