SocialluxSociallux
Toggle navigation menu
Docs navigationv

Primitive

data.validateObjectShape

BETA

Short name: validateObjectShape

Version: 1.0.0

Validate object key shape against requiredKeys and allowedKeys constraints.

Back to primitive library

Inputs

KeyTypeRequiredDescription
allowedKeysarrayfalseWhen provided, only these keys are allowed.
requiredKeysarrayfalseKeys that must exist on the object.
valueanyfalseValue to validate as an object.

Outputs

KeyTypeRequiredDescription
okbooleanfalseTrue when object satisfies all configured key constraints.
reasonstringfalseFailure reason when ok is false. Empty string when ok is true.