A valve system comprising: a main body including a valve element that controls flow of fluid between a plurality of ports (12, 13); and an operation unit capable of being detachably attached to the main body, wherein the main body includes: a driving element that is operated from the outside of the main body by a magnetic force and directly or indirectly drives the valve element; and a first housing that houses the valve element and the driving element and is watertight in a state where pipes (8,9) are connected to the plurality of ports (12, 13), wherein the operation unit includes: an operation element that generates a magnetic field that operates the driving element; and a second housing that houses the operation element, when attached to the first housing, the operation element and the driving element being in a facing state via part of a wall of the first housing and part of a wall of the second housing, characterized in that the first housing and the second housing respectively include configurations for determining positions when the second housing is attached to the first housing, wherein the configurations for determining the positions include a convex portion and a concave portion capable of fitting together via the walls (11w, 24w) of the first and second housings, wherein by removably attaching the operation unit to the main body the driving element is controlled in an attached state by means of a magnetic field originating by the operation element extending via the walls (11w, 24w). a main body including a valve element that controls flow of fluid between a plurality of ports (12, 13); and an operation unit capable of being detachably attached to the main body, wherein the main body includes: a driving element that is operated from the outside of the main body by a magnetic force and directly or indirectly drives the valve element; and a first housing that houses the valve element and the driving element and is watertight in a state where pipes (8,9) are connected to the plurality of ports (12, 13), wherein a driving element that is operated from the outside of the main body by a magnetic force and directly or indirectly drives the valve element; and a first housing that houses the valve element and the driving element and is watertight in a state where pipes (8,9) are connected to the plurality of ports (12, 13), wherein the operation unit includes: an operation element that generates a magnetic field that operates the driving element; and a second housing that houses the operation element, when attached to the first housing, the operation element and the driving element being in a facing state via part of a wall of the first housing and part of a wall of the second housing, an operation element that generates a magnetic field that operates the driving element; and a second housing that houses the operation element, when attached to the first housing, the operation element and the driving element being in a facing state via part of a wall of the first housing and part of a wall of the second housing, wherein the configurations for determining the positions include a convex portion and a concave portion capable of fitting together via the walls (11w, 24w) of the first and second housings, wherein by removably attaching the operation unit to the main body the driving element is controlled in an attached state by means of a magnetic field originating by the operation element extending via the walls (11w, 24w).