Hello everyone,
Recently I tried zend framework (the quickstart project) :) and I really liked it.
All the frameworks (zend, cakephp) implements a very nice way of form fields validation. Moreover these validations are so easy to implement that you only have to give the name of the validation that you want to apply.
Like this:
$this->addElement('text', 'email', array(
'label' => 'Your email address:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array(
'EmailAddress',
)));
Also if any of the input is typed against the validation criteria and submitted, then the remaining form fields values are not cleared at all and proper message is displayed.
This made me think that how shall I create a system similar to this validation criteria. So that it can be easily embedded into a web application which has not been build using the framework.
Ofcourse I can do this in PHP (checking every posted value using functions or classes) but I want to do it the smarter and effecient way just like these frameworks have done.
So does any one know of any library for PHP which is able to do such validations quite smartly.
I hope I am able to explain my doubt clearly. Any help is greatly appreciated.
Thanks