run check_if_valid function when editing event table items