JSLint, The JavaScript Code Quality and Coverage Tool. This file allows JSLint to be run from a web browser. It can accept a source program and analyze it without sending it over the network.
Jakub Strojewski shows how to accumulate errors in a simple Validation use case