He had been in good form this season for Barcelona, who are in contention to win three trophies, before suffering a cruciate ligament injury making a routine save in last week's La Liga game against Celta Vigo.
"The player has been operated on by Dr Ulrich Boenisch and Ricard Pruna in Augsberg, Germany," the club said in a statement.
"The operation was a success and he will now be out for approximately seven months."
Valdes, 32, was set to be named in Vicente del Bosque's Spain squad to go to the World Cup and had a good chance of being the first-choice keeper with Iker Casillas having lost his place in the Real Madrid team to Diego Lopez.
Valdes's contract with Barca runs out in June and he was looking for a move away from the Nou Camp.
- Sports & Recreation
- La Liga