General purpose JavaScript validation library based on type combinators