Adding form validation to surgery popups