I'm not (and i will not) a keen of w3 validation most of the errors are for minimal code issues like
img> instead of img /> or errors like type attribute; this codes are setted by default in all the browsers so when i code i'm not careful with these problems as i said i'm not a keen of w3 validator i will not do a product that is perfect so if you are looking for w3 validation search away, regarding the <msg.length; i++) issue i will check for this in the next version. thanks bor for let me know about this