package conformist
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Conformist allows you to define schemas to decode, validate and sanitize input data declaratively
Install
dune-project
Dependency
Authors
Maintainers
Sources
conformist-0.4.0.tbz
sha256=cabb3e2c2c828d264703a9e42e0a47ee9d766ce129bca4c20eb511d812622623
sha512=b2c4a36e51cc4239cc95fe32661a6dad0b804810e62040ddc843ead1371b26a72602da5523fb1e4ba125552cdcda91ac53e057b3c224f8950db7a22eecc97094
doc/CHANGES.html
0.4.0 - 2021-03-26
Changed
decode,validateanddecode_and_validateall return the sameerrortype
Added
- Improve error reporting by printing provided input values (list of values)
0.3.0 - 2021-03-26
Changed
decodereturns a triple containing(field_name, input, error_msg)instead of a concatenated string. This makes it easier to extract information.
Added
decode_and_validatecombinesdecodeandvalidatewhere the returned value is either the decoded value or a list of errors. When usingdecode_and_validate, one can forget about the difference betweendecodeandvalidateand simply forward the list of errors. This covers a common use case.
0.2.1 - 2021-03-16
Changed
- Replace
ppx_derivingwithsexplib
[0.2.0] - 2021-03-07
Changed
- A field that is
optionalcan be missing from the input data or the value can be[]. Decoding and validation will still work as expected. The decoded value isNone.
[0.1.0] - 2020-09-29
Added
Conformist.Field.type_can be used to retrieve a string representation of the type- Support for custom
encodersfor custom types - Support for encoding default values if present, this can be used to print schemas
Fixed
- Move mandatory field name parameter to the end of create functions in order to get rid of the trailing () argument
[0.0.2] - 2020-09-29
Fixed
- Move
fold_leftto top level module and acceptConformist.tas input
[0.0.1] - 2020-09-20
Added
- Initial release supporting
int,float,string,bool,Ptime.dateand custom types
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page