The new manager has stated that he wants the England international to maintain the correct attitude if a move to Anfield does not materialise for him this summer
Villa have rejected a £12 million bid from the Reds, and a further £15m offer is also believed to have been turned down for the England international.
McLeish has previously experienced a similar situation in his career at Aberdeen, when Sir Alex Ferguson wanted to sign him, but no deal materialised.
He told reporters: "I've spoken to Stewart, I've told him I don't want to sell him.
"There's an obvious distraction there for him but he's been a credit to himself and applied himself in the right way and worked his socks off in training. I don't see a problem professionally.
"Sir Alex Ferguson wanted to sign me for Manchester United when I was at Aberdeen and that wasn't possible in the end.
"That was a big disappointment but I got my head down and worked and I don't doubt Stewart has the character to get through this is he stays at the club.
"It's part of your growing up as a footballer."
Villa are reportedly demanding £20m for the winger's services if Liverpool want him, but McLeish is confident they can keep hold of the player.