A validation framework for JavaScript models