First time posting, so sorry if the formatting isn't clean.
I am trying to follow a tutorial, and I've checked the docs, and they both agree that this is how the Validators should be structured, but I'm still having this problem. Here's the Validators in question:
$this->validate(new \Phalcon\Mvc\Model\Validator\Email([
'field' => 'email'
, 'message' => 'Invalid email'
]));
$this->validate(new \Phalcon\Mvc\Model\Validator\Uniqueness([
'field' => 'email'
, 'message' => 'Email already in use'
]));
$this->validate(new \Phalcon\Mvc\Model\Validator\StringLength([
'field' => 'password'
, 'max' => '50'
, 'max' => '4'
, 'messageMaximum' => 'Must be 50 characters or less'
, 'messageMinimum' => 'Must be 4 characters or more'
]));
My problem is, according to the docs, all the objects above implement the "Phalcon\Mvc\Model\ValidatorInterface", but when my code hits these validators, I get "Fatal error: Uncaught TypeError: Argument 1 passed to Phalcon\Mvc\Model::validate() must implement interface Phalcon\ValidationInterface". Am correct in assuming this is a bug in the library I'm using, and not my code?