Status: implemented
A schema is read against a value by one of three readers, which accept exactly the same DataJS values (outside DataJS the data form is more permissive; see data-validate-admits-non-djs-values):
| Reader | A success carries |
|---|---|
parse(s)(value) | a value built from what s declares |
validate(s)(value) | the value it was given |
validate(toData(s))(value), the data form's | the value it was given |
parseandvalidate: what each reader is for, and how their results differ- Errors: the
{ path, message }a refusal carries - What the readers assume of a value: DataJS values, and what that leaves to the host boundary
- TypeScript: narrowing
- JSON Schema: validation
parse, validate, the data form's validate in data, and the kernel they share in common.