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.

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"



83.4k
Accepted
answer
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.



10.3k

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