If you search, this has probably already been answered several times by now.
804.1 All plumbing fixtures or other receptors
receiving the discharge of indirect waste pipes shall be
approved for the use proposed and shall be of such
shape and capacity as to prevent splashing or flooding
and shall be located where they are readily accessible
for inspection and cleaning. No standpipe receptor for
any clothes washer shall extend more than thirty (30)
inches (762 mm), nor less than eighteen (18) inches
(457 mm) above its trap. No trap for any clothes
washer standpipe receptor shall be installed below the
floor, but shall be roughed in not less than six (6)
inches (152 mm) and not more than eighteen (18)
inches (457 mm) above the floor.
The top of the standpipe MUST be above the FLR of the appliance no matter what, and it sounds like your code wants a minimum dimension of 18", and a maximum dimension of 30", for the standpipe dimension. That's more than enough information to figure out what you have to do.