Skip to contents

Validates that all elements of the value are among the allowed values.

Usage

require_one_of(restriction, values)

Arguments

restriction

a restriction object.

values

vector of allowed values.

Value

The modified restriction object.

Details

NA elements are skipped; chain require_no_na() to reject them.