title: Kohana 3: Callback validation
body: <blockquote>
    <p><strong>NOTE:</strong> This question refers to <strong>Kohana 3.0</strong> only.  Kohana 3.1 and newer handle validation callbacks in a completely different way.</p>
  </blockquote>
  
  <p>I'm doing a validation with a callback (ORM). These are my code:</p>
  
  <pre><code>class Model_Loja extends ORM {
      // more code goes here!
      protected $_callbacks = array(
          'endereco' =&gt; array('endereco_unico')
      );
  
      public function endereco_unico(Validate $validate, $campo) {
          $resultado = $this-&gt;where('endereco', '=', $this-&gt;endereco)-&gt;find_all();
          if(count($resultado)) {
              return false;
          }
          else {
              return true;
          }
      }
      // more code goes here!
  </code></pre>
  
  <p>It's returning true or false (if there is a value, returns false) but how could i send a validation message when it returns false?</p>