Learn R Programming

fb4package (version 2.0.0)

validation_result: Create standardized validation result

Description

Constructor for standardized validation result objects used throughout the FB4 validation system.

Usage

validation_result(
  valid = TRUE,
  errors = character(),
  warnings = character(),
  info = character(),
  level = "core",
  category = NULL,
  checked_items = list()
)

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).

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

Examples

Run this code
validation_result(valid = TRUE)
validation_result(valid = FALSE, errors = "weight must be positive",
                  level = "parameter")

Run the code above in your browser using DataLab