Regularly Replace Water Supply Hoses – Over time, water supply hoses get brittle and can burst suddenly. Check their condition periodically and replace older hoses with the newer type, which are encased in a steel braided exterior. An even better idea would be to upgrade to a newer yet auto-shutoff connector hose. These hoses will sense an excess flow of water and automatically shut off the water supply. These hoses can be bought to work on almost any appliance or plumbing fixture.
Automatic Flood Protection Device – these work by immediately shutting of the source of the water to your washing machine if its sensor detects a water leak. Some models even sound an audible alarm. Prices are generally $150 or less.
Automatic Washing Machine Water Shutoff Valve and Leak Sensor - This valve does it all. It is designed to stop the water supply to the washing machine if the machine is turned off. If the washer is on and the valve detects a leak or excessive water flow, it shuts the water supply off. These valves are easy to install as a DIY project and can be purchased for under $200.