title: Phalcon PHP custom validation rule raise an error
body: <p>I'm using Phalcon framework, and I'm trying to make a custom validator:</p>
  
  <pre><code>&lt;?php    
  use Phalcon\Validation\Validator,
      Phalcon\Validation\ValidatorInterface,
      Phalcon\Validation\Message;
  
  class Currency extends Validator implements ValidatorInterface
  {
  
      /**
       * Executes the validation
       *
       * @param Phalcon\Validation $validator
       * @param string $attribute
       * @return boolean
       */
      public function validate($validator, $attribute)
      {
          $value = $validator-&gt;getValue($attribute);
  
          if(! is_numeric($value))
          {
              $message = $this-&gt;getOption('message');
              if(! $message){
                  $message = 'Not a valid currency.';
              }
  
              $validator-&gt;appendMessage(new Message($message, $attribute, 'Currency'));
  
              return false;
          }
  
          return true;
      }
  
  }
  </code></pre>
  
  <p>I get this error when trying to use the validator above:</p>
  
  <blockquote>
    <p>Unexpected value type: expected object implementing
    Phalcon\Mvc\Model\ValidatorInterface, object of type Currency given</p>
  </blockquote>
  
  <p>I put the validator class in /plugins/validators/Currency.php and auto-loaded it of course using DI.
  Any clues?</p>