General purpose validation library for JavaScript