Types are representation of whole VO structure and are also able to track exact keys which are invalid. In order to check which keys were invalid, user has to compare invalid keys with sent data and that's impractical.
All the Type methods which mark value invalid should be required to also add that value to Type so it could be rendered together with invalid key by Formatter.
In this stage we should resolve the problem to satisfaction just in Type. Optimal rendering in ErrorFormatter could be quite complex and for now only minimal implementation in VisualErrorFormatter should be enough to verify solution - something like key: string (received int(123) instead)
Types are representation of whole VO structure and are also able to track exact keys which are invalid. In order to check which keys were invalid, user has to compare invalid keys with sent data and that's impractical.
All the Type methods which mark value invalid should be required to also add that value to Type so it could be rendered together with invalid key by Formatter.
In this stage we should resolve the problem to satisfaction just in
Type. Optimal rendering inErrorFormattercould be quite complex and for now only minimal implementation inVisualErrorFormattershould be enough to verify solution - something likekey: string (received int(123) instead)