[Validator] Removed information from the violation output if the value is an array, object or resource

This was decided in the discussion of #10687.
[Validator] Added more detailed inline documentation