Add javascript validation