when washer machine is filling, water does not stop

The problem with the washer is that when it was turned on and the water was filling the unit - it never cut off. It seemed like the water cutoff switch was not working?? The water continued to run and went all over the floor. We then turned the water off at the source.
To get the machine back to normal and the water to subside and drain, we had to manully control the knobs on the front of the machine.
Can you help us with this problem?

Thanks so much!!