Washing machines are manufactured with metal and plastic. Also, there you will see electrical parts like a circuit board, motor, etc.
If you install it in the bathroom, the splashes of water may cause corrosion over the metal of the washing machine.
Hence, it will be very risky to install it in the bathroom. Try to install it somewhere else.
Still, if there is no other place in your house, you can contact the authorized technician from the manufacturer to know the safety guidelines accurately.