Matt Cutts, Gogles SPAM engineer commented in a Google video message this week that Google does not penalize websites for errors in their coding nor does Google give browny pints to sites that ahve erro free code that validates. Cuts said that Google understands that most web pages are not made by coding experts and therefore it would be foollish to expect web pages to validate. See
Matt Cutts comments on errors in web page coding here.