PHP / Javascript validation library

can someone recommend a PHP form validation library (which works independently outside of any php framework) which besides doing all kinds of basic validation (empty, vs regex, is email, is alphanumeric, etc.) can generate code javascript (ideally to work with jquery) to validate the same form with the same rules on the client side and therefore define the validation rules in one place and have the form validated on both the server and client side?

Thanks.

+2


a source to share


2 answers


The nette framework does the following: http://doc.nette.org/en/forms

All form and validation rules are defined in the PHP file. The framework then generates the HTML with JavaScript validation and, once submitted, performs server side validation.



You can even use the Forms part in the framework separately.

+1


a source


Please visit www.phpclasses.org . There should be many validation classes. You can expand them according to your requirements.



-3


a source







All Articles