Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

ODM validation Uniqqueness

has anyone experienced something like

Unexpected value type: expected object implementing Phalcon\Mvc\ModelInterface, object of type App\Core\Models\Mongo\Category\CategoryTranslation given

This is what i have:

    class CategoryTranslation extends \App\Core\Models\Mongo\BaseCollection


    public function validation()
         $this->validate(new Uniqueness(array(
             'field' => 'slug',
             "message" => "The slug must be unique"

         return $this->validationHasFailed() != true;


Ps: I have checked the and i still get the same error with the custom validator.


Thank you. It is working.