Fixed logic in valid_value checkings while submitting an event