Dishwasher overfilling

My dishwasher continues to fill after the wash cycle has started resulting in water leaking out of the dishwasher. I suspect the float switch or the fill valve. Any ideas?

Use a meter and measure across the fill valve.
If voltage stops and the machine continues to fill it is the fill valve.
If the voltage continues past normal fill then it is probably the timer.

Float switch is usually just a safety device to stop a kitchen flood.
If the float switch shuts off the valve then I would lean toward the timer.

Do not have a wiring diagram so cannot say for sure.
Check behind the kick plate the diagram may be taped to the back of the plate or the tub.