Only firing valid event after form submission when all elements are valid