Make it clear to users what they did wrong.
It’s always best to show both the good fields and the invalid fields right away.
While using accordions and validation in a form avoid hiding invalid fields.
If you have any research evidence, that this tip does not work in specific conditions, please share it with us. We will expand the database with that particular case to grow the collective knowledge together.