When having complex objects in attributes it simply crashes.
Validation should skip those attributes which are not present in the validation object and a mechanism should be present to skip flatten for specific attributes, because now it is not possible to validate more complex objects.