cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[NFR] Implement standalone validators

Open alvassin opened this issue 13 years ago • 7 comments

In phalcon framework there are many nice and wonderful solutions.. except validators :)

We have 2 validator classes for email for MVC and for forms validation.. but there could be one, that could also be used as standalone element, it would be much easier to understand how it works and to build complex own applications.

Current solution is not flexible enough (from my point of view). Please have a look at Zend Validators (i don't like this framework for it's giant code amount and because they don't use ready solutions.. but.. it's much more flexible):

http://framework.zend.com/manual/1.12/en/zend.validate.set.html

Standalone elements could be used by MVC or Forms classes.. and this could work...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

alvassin avatar Mar 19 '13 13:03 alvassin

There is one:

https://phalcon-php-framework-documentation.readthedocs.org/en/1.0.0/api/Phalcon_Validation.html

@phalcon I described validator as a standalone reusable component earlier this year in Google group :-)

roman-kulish avatar Mar 30 '13 11:03 roman-kulish

+10 for this NFR Also see: http://forum.phalconphp.com/discussion/255/modularity-of-documentation#C1041

salarmehr avatar Apr 27 '13 05:04 salarmehr

Please stop developing new components.

Improving the structure of current components and making them stable is far more important.

salarmehr avatar Apr 27 '13 13:04 salarmehr

:+1:

roman-kulish avatar May 10 '13 01:05 roman-kulish

:+1:

iforp avatar May 13 '13 08:05 iforp

+1

Mparaiso avatar Jun 22 '13 12:06 Mparaiso

Well in phalcon 3 pretty much there is already Phalcon\Validation for using in both models and forms. In phalcon 3.1 Phalcon\Mvc\Validator(which is used only in collections) will be marked as deprecated since collection will have option to use Phalcon\Validation, in 4 removed. About standalone there is still need for Validation class, but i like this better.

Jurigag avatar Jan 25 '17 22:01 Jurigag