Primitive
data.validateEnum
BETAShort name: validateEnum
Version: 1.0.0
Validate that a value is included in an allowed primitive-value set.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| allowed | array | true | Array of allowed values checked with primitive equality. |
| value | any | false | Value to validate. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| ok | boolean | false | True when value is included in allowed. |
| reason | string | false | Failure reason when ok is false. Empty string when ok is true. |