The floor should be resistant to water, however this is more of a cleaning requirement: you want to be able to cleanup any spills of soap on the floor. Engineered wood floors would meet this requirement.
As @bib mentions, there are drain pans available to place under your machine to catch any leaking water. However, periodically looking under you machine for any leaks would be sufficient to ensure there is no damage from a machine that has developed a leak. This also may alert you sooner to a developing issue.
The biggest risk with washing machines is that of the supply hoses bursting and causing massive water damage, especially when no one is home to shut it off. A non-drained drain pan will not provide any reduction of damage in this scenario.
To limit the risk of water damage caused by burst supply hoses, you should replace the hoses every 3 to 5 years. It's also recommended to use a higher quality hose, such as a stainless braided one. In addition, shut off the supply to the hoses when you leave for an extended period of time (weekends/vacation).
There also exists multiple products that can be installed either during the rough-in stage or as a retro-fit, that will detect if a hose bursts and automatically shut off the water supply. There are even versions that come with a floor sensor that will also shut off the water supply if water is sensed. More information can be read found in this This Old House article.