Prevent node from being saved
I've found that the best way is to just thrown an error during presave. Here's a simple example:

function mymodule_node_presave($node){
  if(empty($node-&gt;title)){
    throw new Exception('Error saving node: Title cannot be empty');
  }
}


The node_save() function has a try...catch block wrapping the presave step that will catch the exception.

The advantage of this over drupal_goto() is that, if you're importing multiple nodes, it will skip the current node and proceeed to the next one. This is great if you're using something like the Feeds module. In contrast drupal_goto() will exit immediately and may interfere with other steps in the request or cron, which will break importing multiple nodes.