Revert "Revert "Added local JS validation""

This reverts commit f80f5636d8aa7bb62b37cf0f2361c2c985c0d2bd.