I don't believe there is any such requirement. It would be in NEC 680, though it is possible that your local government has implemented different requirements.
680 specifically says that the receptacle for the pump wiring can be no closer than 5', but it doesn't specifiy the pump location.
Is this an inground or on ground pool? For an inground, you want the pump as far from the pool as you can get it for noise reduction. Keeping it out of the splash zone can only make it last longer.