> which of the two validation is supposed to refer to

In this context, it's the former. If I say, "It's dumb that you feel that way but here's you're stupid gloves," to a toddler, I solved their problem but I also likely made them feel like their problem is somehow not a "valid" one. Especially when this happens repeatedly to children is when they grow up with particularly anti-social behaviors, for fear of others abusing them similarly.