validation_result: Create standardized validation result

View source: R/11.0-core-validators.R

validation_resultR Documentation

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

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)
validation_result(valid = FALSE, errors = "weight must be positive",
                  level = "parameter")

fb4package documentation built on May 8, 2026, 1:07 a.m.