openmrs-esm-core

O3 Framework / oneOf

Function: oneOf()

oneOf(allowedValues): Validator

Defined in: packages/framework/esm-config/src/validators/validators.ts:62

Verifies that the value is one of the allowed options.

Parameters

allowedValues

The list of allowable values

any[] readonly any[]

Returns

Validator

A validator function that checks if a value is in the allowed list.