Primitive
data.validateRequired
BETAShort name: validateRequired
Version: 1.0.0
Validate that a value is present (not null/undefined), with optional empty-string allowance.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| allowEmptyString | boolean | false | When true, an empty string counts as present. Defaults to false. |
| value | any | false | Value to validate. Missing or undefined is treated as not present. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| ok | boolean | false | True when value satisfies the required check. |
| reason | string | false | Failure reason when ok is false. Empty string when ok is true. |