How to validate/verify .desktop files?

I have a couple of .desktop files that aren’t working as expected or not at all. I can’t see any error anywhere and asking for help on each one seems unproductive. Is there a way I can verify that I’m using the correct syntax in the file, that it complies with the FreeDesktop standard, so I can apply specific fixes?