Add javascript validation to test