orisai / object-mapper

Raw data mapping to validated objects
Mozilla Public License 2.0
10 stars 1 forks source link

Store minimal data samples in case of error #20

Open mabar opened 3 years ago

mabar commented 3 years ago

Continue of #10

We should not need to track whole data structure in case it does not match our rules.

mabar commented 3 years ago

e.g. array and list rules don't have to track whole value when parameters are invalid. Only sample of data should be enough, individual items track invalid values themselves.

Most (maybe even all) rules can store sample in case of invalid data type.