add js validation