title: validation before unwind ViewController
body: <p>Is there a way to do a validation before unwind a ViewController?</p>
  
  <p>i have my ViewController1 and there is a unwind function </p>
  
  <pre><code>    @IBAction func unwind(segue: UIStoryboardSegue) {
  
         // make stuff with data
  }
  </code></pre>
  
  <p>And a button from ViewController2 is conected with that unwind function, and i pass data from my ViewController2 to ViewController1 in <code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)</code>
  all works fine, but i want to do some validations.</p>
  
  <pre><code>if sender as? UIBarButtonItem == self.saveButton  {
  
          if let content = self.textFieldContent.text {
              publish.content = content
              publish.image = self.image
          } else { 
             self.alertMessage("Content is empty")
          }
  
      }
  </code></pre>
  
  <p>The <code>self.alertMessage()</code> function appears but the ViewController2 is dismissed every time. And i dont want this to happens, how can i achieve that?</p>