We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Why is collection validation not deprecated in favour of Phalcon\Validation?

I've found that the new way of using validation in models has not been extended to collections.

Collections still currently use Phalcon\Mvc\Model\Validator's.

If Model Validators are to be deprecated then this should be possible with Collections:

    public function validation()
    {
        $validator = new Validation();

        $validator->add(
            'email', //your field name
            new EmailValidator([
                'collection' => $this,
                'message' => 'Please enter a correct email address'
            ])
        );

        $validator->add(
            'username',
            new UniquenessValidator([
                'collection' => $this,
                'message' => 'Sorry, That username is already taken',
            ])
        );

        return $this->validate($validator);
    }

Are there any plans to do this or is support to Collections going to cease to be?

Using latest v3.0.1?