Is it okay if a magnet attached to my iPhone charger?

Is it okay if a magnet attached to my iPhone charger?

Added (1). I set my iPhone charger on a table not knowing that a magnet attached to the part that plugs into the bottom of the phone. It was like this overnight. It seems to still be charging normally. Is it likely that anything was damaged?

No damage. IPhones don't use magnetic media for storage.