liquid level switch and solenoid valve circuit
The Switch you linked has a maximum current rating of 0.28 amps, and the valve has a maximum current rating of 0.41. as such you should look at a different solution. Either different parts or perhaps use a 5 volt signal to the switch that will then turn on a relay to enable to valve. And be sure to add some fuses for safety when working around water.