Valmiki proudly says to Ram, 'I am the 10th son of Pracheta, and I never remember speaking even one untrue sentence'. How can such a missionary and follower of truth could have written an imaginary story of Ram?
God knows all and should know about valmik. Ram is not god, he coould have been a good king, ruler etc, but certainly not god.