This is from rules of FIFA:
"The final list of the 14 players (two of whom shall be goalkeepers) selected to participate in the final competition shall be submitted to the FIFA general secretariat ...
The phrase in question is "two of whom shall be goalkeepers". What does it mean exactly? Two possible options and the difference is really crusial:
1) That there should be no less than 2 goalkeepers. 3 goalkeepers is possible (3+11). One goalkeeper is forbidden - Team needs at least another one in case that the first get injured.
2) That there should be exactly 2 goalkeepers on the team (2+12). It is forbidden if there are 3 goalkeepers on the team.
I personally think that 1) is correct but I'm not 100% sure to tell you the truth.