Add validation to prevent multiple clicks or ajax requests.