Replace npm package with manual valiadation