When melding materia onto a piece, does the player level have to match the level of the materia being melded? Or the level of the equipment?

Thanks