4 ms·
No, the idea is that your application level validation functions take in data, own it and return a validation error or new type that has invalid states removed.
by lexicality 2y ago
No, the idea is that your application level validation functions take in data, own it and return a validation error or new type that has invalid states removed.
In this case you could make a wrapper function that accepts the raw binary data, passes it to Cap'n'Proto, validates the output (this field is actually required etc) and then returns it
- zigzag312 2y agoOf course this is the correct way, but doing this manually is a lot of work. Ability to append validation schema to the input schema and have validation functions and valid-state types generated automatically would be a big boost in productivity.