title: Phalcon\Mvc\Model::validation() and non-model validators
body: <p>I am working on Model validation using Model::validation() call.</p>
  
  <p>It looks like Model::validate() only accepts validators from <strong>Phalcon\Mvc\Model\Validator</strong> namespace and crashes when <strong>Phalcon\Validation\Validator</strong> are used:</p>
  
  <pre><code>class User extends Phalcon\Mvc\Model
  {
      protected $email = 'invalid @email.*';
  
      public function validation()
      {
          // Validator from Model namespace
          $this-&gt;validate(new Phalcon\Mvc\Model\Validator\Uniqueness(array(
              "field"   =&gt; "email",
              "message" =&gt; "The email is already registered"
          )));
  
          // Validator from Validation namespace - causes "BadMethodCallException" - "Wrong number of parameters".
          $this-&gt;validate(new Phalcon\Validation\Validator\Between(array(
              "field"   =&gt; "counter",
              'minimum' =&gt; 10,
              'maximum' =&gt; 20,
              "message" =&gt; "Invalid value"
          )));   
  
          $validationHasFailed = $this-&gt;validationHasFailed();
          return $validationHasFailed != true;
      }
  }
  </code></pre>
  
  <p>This results in <strong>BadMethodCallException - Wrong number of parameters</strong> error.</p>
  
  <p>My next thought was to alter the code as follows:</p>
  
  <pre><code>class User extends Phalcon\Mvc\Model
  {
      protected $email = 'invalid @email.*';
  
      public function validation()
      {
          // Omitting Uniqueness validator.
  
          $validation = new Phalcon\Validation();
          $validation-&gt;add('email', new Phalcon\Validation\Validator\Email);
          $this-&gt;validate($validation);
  
          $validationHasFailed = $this-&gt;validationHasFailed();
          return $validationHasFailed != true;
      }
  }
  </code></pre>
  
  <p>However, that code fails to detect invalid value of email field (no validation error occurs).</p>
  
  <p>At the same time, the following email validation works as expected:</p>
  
  <pre><code>$validation = new Validation();
  $validation-&gt;add('email', new EmailValidator());
  $messages = $validation-&gt;validate([
      'email' =&gt; 'bad email @...',
  ], 'email');
  </code></pre>
  
  <p>Question:</p>
  
  <p>Can I use non-Model validators in Model::validation() call?</p>
  
  <p>Thanks!</p>