schema_validator_levels: Create a levels-based schema validator

View source: R/schema_helpers.R

schema_validator_levelsR Documentation

Create a levels-based schema validator

Description

Returns a predicate function that checks a scalar value against a set of allowed character levels and optional missingness.

Usage

schema_validator_levels(levels, allow_na = FALSE)

Arguments

levels

A character vector of allowed level labels.

allow_na

Logical scalar indicating whether missing values are permitted.

Value

A function of signature function(x) -> TRUE/FALSE.


fluxCore documentation built on Sept. 22, 2026, 5:07 p.m.