validation.ts
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "validation.ts", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Validation for TypeScript", | ||
@@ -9,3 +9,3 @@ "main": "lib/validation.js", | ||
"dependencies": { | ||
"space-lift": "0.3.0" | ||
"space-lift": "0.3.1" | ||
}, | ||
@@ -12,0 +12,0 @@ |
@@ -25,3 +25,15 @@ # validation.ts | ||
In case of errors, The `Result` contains an Array of `{ message: string, context: string }` where `message` is a debug error message for developers and `context` is the path where the error occured (e.g `root / data / 0 / name`) | ||
`errorDebugString` will give you a complete debug string of all errors, e.g. | ||
``` | ||
At [root / c] Error validating the key. "c" is not a key of { | ||
"a": true, | ||
"b": true | ||
} | ||
At [root / c] Error validating the value. Type error: expected number but got string | ||
``` | ||
## primitives | ||
@@ -28,0 +40,0 @@ |
27844
159
+ Addedspace-lift@0.3.1(transitive)
- Removedspace-lift@0.3.0(transitive)
Updatedspace-lift@0.3.1