Light junction box near water
I don't see any direct issues here.  

However, to prevent any issues in a "what-if" scenario where the valve springs a high pressure (spraying) leak: 
For the junction box in the wall, have the wires enter the box from the bottom, and have the wire form a "U" loop at the bottom.  This way, if there ever is some kind of spraying leak from the valve (unlikely) that any water that gets onto the NM jacket would drip off at the bottom of the "U" loop and not run into the junction box.  If you have the wire running in from the top of the box, its possible that in a leak situation the water on the NM cable could drip into the junction box which would be very bad.

Make sure the box is installed correctly, with the NM jacket coming just into the box.