Dishwasher won't stop filling

I was wondering if a bad inlet valve would cause my dishwasher to continuously fill and never know when to stop filling. Basically I need to shut off the water source to solve the problem which means I’d have to stand next to the dishwasher turn on the water to wash turn it off to steam and back on to rinse. I don’t know if a freeze problem could’ve cracked the float inside the valve or not but does this seem to be the part that is not working for the problem I’m having?

Sounds like the valve will have to be replaced.