SocialluxSociallux
Toggle navigation menu
Docs navigationv

Primitive

data.validateRequired

BETA

Short name: validateRequired

Version: 1.0.0

Validate that a value is present (not null/undefined), with optional empty-string allowance.

Back to primitive library

Inputs

KeyTypeRequiredDescription
allowEmptyStringbooleanfalseWhen true, an empty string counts as present. Defaults to false.
valueanyfalseValue to validate. Missing or undefined is treated as not present.

Outputs

KeyTypeRequiredDescription
okbooleanfalseTrue when value satisfies the required check.
reasonstringfalseFailure reason when ok is false. Empty string when ok is true.