Uniform Plumbing Code & International Residential Code both state:
Section RM2005.1 states that that water heaters should be installed in accordance
with manufacturer’s installation instructions and the code requirements.
Section 2801.5 states that a drain pan and drain are required.
Section RM2005.1 General. Water heaters shall be installed in accordance with the manufacturer's installation instructions and the requirements of this code. Water heaters installed in an attic shall conform to the requirements of RM1305.1.3
RP2801.5 Required pan. Where water heaters or hot water storage tanks are installed in locations where leakage of the tanks or connections will cause damage, the tank or water heater shall be installed in a galvanized steel pan having a minimum thickness of 24 gage (0.016 inch) (0.4 mm) or other pans listed for such use.”