Former Barcelona midfielder Xavi Hernandez has warned Ousmane Dembele he must have the right mentality to make the grade at Camp Nou.

Xavi, who spent 17 seasons at Barcelona before moving to Qatar in 2015, says excellent players have failed at the Catalan club because they were unable to cope with the expectations.

Dembele has endured a testing first season at Barca since signing from Borussia Dortmund last summer for a then club-record fee of €105 million.

The France international has missed large chunks of the campaign due to injuries and it's been suggested he put too much pressure on himself following his arrival as Neymar's replacement.

"[Dembele] will have to learn to think faster, in a few thousandths of a second," Xavi told So Foot.

"This is where we will see if he has the mentality. He must say to himself: 'I am a Barca player.' You have to be mentally strong, to have conviction.

"He will need some time. Barca is like a final exam for a footballer. It is like Dembele is passing a Master's degree right now because not everyone can play for this club. Why? Because you have to know things three times more than elsewhere.

"Barca play on barely 30 metres of the pitch. Dembele has a lot of talent, he is very fast, but here, he is not going to have the space he had at Dortmund or Rennes. He had more space, so more time there."

Ousmane Dembele joined Barcelona from Borussia Dortmund in August 2017. Aitor Alcalde/Getty Images

Xavi pointed out that talent isn't everything when it comes to being a success at Barca either, saying that average players have survived at the club "because they had character" while better players have struggled.

"In training, when you saw [the better players], you would say to yourself: 'They will break everything. They're going to be legends,'" he said.

"But no. As soon as they entered the pitch, their legs started shaking, they did not want the ball anymore. And you would wonder: 'What's happening to them?'"

There have been signs in recent weeks that Dembele is finally rediscovering his form from the Bundesliga last season, though, with impressive performances in wins against Girona, Malaga, Chelsea and Athletic Bilbao.

In total, he's now made 13 appearances for the Blaugrana and he's started the last three games, creating goals in the wins against Malaga and Athletic and scoring his first goal for the club against Chelsea.

Coach Ernesto Valverde said he has taken "huge steps" forward after finally proving his fitness and contributing on the pitch as Barca continue to chase third treble in 10 years.