No code that I know of but others may know more. It only makes sense to not locate the receptacle anywhere it might get wet if things start dripping or the outlet hose comes loose. It also makes sense to put the receptacle some place where you can get at it w/o having to move any of the appliances.
NEC 210.50 (c) Laundry appliances shall be installed within 6' of the intended receptacle outlet.
NEC 210.8 (7) only 15 or 20 amp 125 volt rated receptacles installed within 6' of a laundry sink are required to have gfci protection.
Technically if you have to add on to the wiring of an existing 3 wire dryer 120/240 (electric not gas) that only has 2 hots and a neutral in the supply you would be in violation of the NEC codes for single family dwellings.
A 4 wire branch circuit with neutral and ground separate is required for all new construction and additions.
A forum community dedicated to Do it yourself-ers and home improvement enthusiasts. Come join the discussion about tools, projects, builds, styles, scales, reviews, accessories, classifieds, and more! Helping You to Do It Yourself!