The physical size does not matter. What matters is the electric spec. For example, if the valve draws 200mA of current, make sure the transistor or mosfet you are using can supply that amount of current. Since this is DC valve, you can measure the resistance on the two wires and divide 12V by the resistance. That will give you an idea of the operating current.