it won't charge as long as it's moist & you see the message. you might think about wireless charging, if phone is up to it.
If you phone got wet, especially at the charging port, the phone won't charge as stated. If you dry out the phone at the charging port then your phone should work. If it is an error, you could use a wireless charger as stated previously. A good method to dry out your charging port faster is to put your phone charging port near a light bulb ( few inches away) and let the light and heat dry out the moisture faster, perhaps a couple of hours.. This has worked for me. Good luck.