In order for something to form an enol there must be hydrogens on the beta carbon next to the aldehyde.
Formaldehyde has no carbons beta to the carbonyl and 2,2 dimethyl propanal has a quarternary carbon next to the aldehyde- no beta hydrogens.
Why do you ask about this? If you would like more information on this research the Aldol reaction