Primitive
data.validateType
BETAShort name: validateType
Version: 1.0.0
Validate that a value matches an expected primitive classifier.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| expected | string | true | Expected type classifier: string, number, boolean, object, array, date, or objectId. |
| value | any | false | Value to validate against the expected type classifier. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| ok | boolean | false | True when value matches expected classifier. |
| reason | string | false | Failure reason when ok is false. Empty string when ok is true. |