My iPhone says accessory not supported while charging?

I've had my iPhone 5c for about 10 months and for the last 2 days, when I put my plug my charger in, it would say that the accessory is not supported. I'm using the charger in the box so why isn't it working?

There's probably some damage to the charger or something is wrong with the cable