Logical fallacy
Ad hominem (personal attack)
Uses a personal attack as a reason to dismiss a person’s claim or argument when the personal criticism does not bear on its merits or the reliance on their testimony.
Also called Abusive ad hominem, Personal attack
Examples
Ignore Nia's calculations about the roof. She is an idiot.
The proposal must be wrong because the person who wrote it is a bore.
She is obnoxious, so her proof must be wrong.
A similar case that can be sound
The sole witness was unable to see the scene, so their eyewitness identification needs independent support.