I used NewPostManager.add_handler, it seems like the :validate_post event only notifies and does not present the opportunity to return a result and deny the post.
Here’s a plugin which disables posting with the flick of a button: GitHub - communiteq/discourse-prevent-posting · GitHub
Configuration
Go to Admin - Plugins - discourse-prevent-posting - Settings
prevent posting enabled : enable the plugin and prevent new posts from being made.
prevent posting message : message to show as global notice when the plugin is enabled.
prevent posting allow pms : if enabled, PM’s are allowed.