We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Validation improvements

Hello. I think that twice validaton classes are unnecessary and confusing and unclear.

So I have a proposal for phalcon DEV team on how to resolve it and make it clean.

I think that will be better that model validators will be deleted, then add into second validator which are needs Models to work, function or add into constructor to set Model, so my mean is:

$element->addValidation(new Validator\Uniquness("\Model\User",array('field' => 'email'));

I think that will be better :) what you mean ?

"Sorry for my english"

edited Aug '14

I think remove model validators from Phalcon will break several applications which is something we don't want right now. I think we could deprecate them later in order to promote Phalcon\Validation.


Phalcon, maybe giving a short notice about this recommendation in official docs would be helpful for new users? Im sure they would appreciate that.