title: adding individual validation rule and function, kohana 3.0.8
body: <p>i am diving deeper into kohana and i like it verry much. especialy the hmvc stuff and much more.
  at the moment i have problems with adding my own rules to the validation instance.</p>
  
  <p>validation runs well, and i also think that my own function get called correctly. but the problem is that the error message for my own validation function is not be shown.</p>
  
  <p>maybe someone can look into the code to see what i did wrong. thanks!</p>
  
  <p>here is my code i deleted some stuff to shorten it up a bit:</p>
  
  <pre><code>    class Controller_Bookmarks extends Controller_DefaultTemplate
      {
  
      public function action_create_bookmark()
      {
     $posts                            = new Model_Post();
  
     if($_POST){
     $post = new Validate($_POST,$_FILES);
  
     //attaching rules
     $post  -&gt;rule('bookmark_title', 'not_empty')
       -&gt;rule('bookmark_image', 'Model_Post::email_change');
  
     //add error for custom functionm
     $post-&gt;error('bookmark_image', 'email_change');
  
  
     if ($post-&gt;check())
     {
      echo 'yeah';
     }else{
      print_r($post-&gt;errors('validate'));
     }
    }else{
  
    }
  
    $this-&gt;template-&gt;content          = View::factory('pages/create_bookmark');
    }
      }
  </code></pre>
  
  <p>my model:</p>
  
  <pre><code>class Model_Post extends Kohana_Model
   {
  
   public function email_change($str)
   {
  
  
    return false;
  
   }
  
  
   }
  </code></pre>
  
  <p>my error message definition messages/validate.php (just for testing):</p>
  
  <pre><code>     &lt;?php defined('SYSPATH') or die('No direct script access.');&lt;br /&gt;
      return array(
     'alpha'         =&gt; ':field must contain only letters',
     'alpha_dash'    =&gt; ':field must contain only letters and dashes',
     'alpha_numeric' =&gt; ':field must contain only letters and numbers',
     'color'         =&gt; ':field must be a color',
     'credit_card'   =&gt; ':field must be a credit card number',
     'date'          =&gt; ':field must be a date',
     'decimal'       =&gt; ':field must be a decimal with :param1 places',
     'digit'         =&gt; ':field must be a digit',
     'email'         =&gt; ':field must be a email address',
     'email_domain'  =&gt; ':field must contain a valid email domain',
     'exact_length'  =&gt; ':field must be exactly :param1 characters long',
     'in_array'      =&gt; ':field must be one of the available options',
     'ip'            =&gt; ':field must be an ip address',
     'matches'       =&gt; ':field must be the same as :param1',
     'min_length'    =&gt; ':field must be at least :param1 characters long',
     'max_length'    =&gt; ':field must be less than :param1 characters long',
     'phone'         =&gt; ':field must be a phone number',
     'not_empty'     =&gt; ':field rrrrrrrrrrrrrrrrrrrrr must not be empty',
     'range'         =&gt; ':field must be within the range of :param1 to :param2',
     'regex'         =&gt; ':field does not match the required format',
     'url'           =&gt; ':field must be a url',
     'email_change'  =&gt; ':field gdffddfgdfhgdfhdfhhdfhdfhdfhd',
     );
  </code></pre>