changes to save button click event for required field validation