Validation uniqueness of multiple fields in form class

Hi, i trying validate uniqueness multiple field in form class. I based on https://forum.phalconphp.com/discussion/15851/using-uniqueness-validation-in-forms-with-multiple-fields-and-sp but i failed.

I make that code, but i can't find where's problem:

use Phalcon\Validation\Validator\Uniqueness as UniquenessValidator;

class BundleUserForm extends Form
{
    public function getValidation()
    {
        $validator = new Validation();
        $validator->add(['quantity', 'bundle_id'], new UniquenessValidator([
            'model' => $this->getEntity()
        ]));
        return $validator;
    }

    public function build()
    {
        $field = new Numeric('quantity');
        $this->add($field);

        $field = new Select('bundle_id', $this->bundleRepository->find(), ['using' => ['id', 'name']]);
        $this->add($field);
    }
}

After execution some weird error occurs in log:

Parameter 'name' must be a string

Anbody had similar problem? Any sugestion will by nice!

edited 10d ago

What exactly is entity? Maybe in database you have not null column and you forgot to set it anyway? Or try to cleat metadata. This is built-in not-null validation based on null/not null columns in database.