SocialluxSociallux
Toggle navigation menu
Docs navigationv

Primitive

data.validateEnum

BETA

Short name: validateEnum

Version: 1.0.0

Validate that a value is included in an allowed primitive-value set.

Back to primitive library

Inputs

KeyTypeRequiredDescription
allowedarraytrueArray of allowed values checked with primitive equality.
valueanyfalseValue to validate.

Outputs

KeyTypeRequiredDescription
okbooleanfalseTrue when value is included in allowed.
reasonstringfalseFailure reason when ok is false. Empty string when ok is true.