Can be implemented by having a validate function for each datatype
useful to debug calls to write
should be optional to avoid perf issues
examples:
- i8 : check whether input is between -128 and 127
- container : check all fields are present and no additional, check all subtypes