Triggering client-side validations based on events