Answer:

All praise is due to Allah, exalted is He, and peace and blessing be upon His Messenger.

No your fasting will not be valid if you find out that you have eaten before sunset; you will have to make it up later. You will not be sinful and your reward will not be decreased, nor is kaffarah (expiation) applicable.

 

And Allah knows best.

 

Answered by: Maulana Ashraf Zaman