add validate api method, enhance parse