The present invention relates to a washing machine comprising a drum, an electric motor for rotating the drum, a pump, a user-interface, a controller and a door assembly. In the washing machine of the present invention, the door assembly comprises a glass element (2) and an electrically conductive element (1) which is formed on a predetermined section (3) of the glass element (2). The electrically conductive element (1) is conductively connected to the controller which is programmed to monitor a voltage across the electrically conductive element (1) and/or an electric current flowing through the electrically conductive element (1), and to terminate the washing mode when a monitoring result is indicative of a breakage of the electrically conductive element (1).