It is another blow for Barcelona, who have a number of injury problems, and for Valdes who plans to leave the club when his contract runs out at the end of the season.
"Injuries never come at a good time and it is unusual for a keeper to get a leg injury but this is the situation and we will have to deal with it," Barcelona sports director Andoni Zubizarreta told Radio Marca.
The friendly in South Africa began as a night of nostalgia with Spain back at the scene of their 2010 World Cup triumph in Johannesburg but they lost 1-0 with a midfield that struggled to link up and an attack that lacked cutting edge.
Andres Iniesta was one of the few Spanish players to come out of the game with any credit in a team missing a string of other Barcelona men.
Midfielders Xavi Hernandez and Cesc Fabregas were unavailable due to injuries along with defenders Gerard Pique and Jordi Alba.
Barca coach Tata Martino also has to deal with the absence of World Player of the Year Lionel Messi while Dani Alves and Javier Mascherano have returned from international duty with strains.
Cristian Tello is also injured so there could be a chance for Pedro Rodriguez, who started for Spain on Tuesday, to stake a claim for a regular.
Valdes's understudy is the veteran Jose Manuel Pinto who has had little first-team action in recent seasons and is not a player the board have shown confidence in.
His contract runs out at the end of the season and there are no signs at this stage of a new deal being offered to him.
Pepe Reina, on loan at Napoli from Liverpool and who replaced Valdes after 81 minutes against South Africa, and Borussia Moenchengladbach's Marc-Andre ter Stegen have been linked with a move to Barcelona next year.
Image: Victor Valdes
Photograph: Gonzalo Arroyo Moreno/Getty Images
I don't play cricket to make comebacks: Gambhir
France, Portugal, Croatia qualify for 2014 Rio World Cup after heroics
BEST Sports Photos of the Week!
World Chess: Carlsen in control as Anand draws Game 8
Messi draws another blank but Barca win derby