start JavaScript API for validating