views:

36

answers:

2

Hi,

could someone recommend a PHP form validation library (that works independently outside of any php framework) that apart from doing all sort of basic validation (is empty, vs regex, is email, is alphanumeric and so on) can produce javascript code (ideally to work with jquery) to validate the very same form with the very same rules client-side and hence define validation rules in a single place and have a form validated both server and client side?

Thanks.

A: 

Please visit www.phpclasses.org. There should be many validation classes. You can extend them as per your requirement.

atif089
A: 

the php filters are great for validating user input. build your own class with methods using these filters

http://www.php.net/manual/en/filter.filters.validate.php

David Morrow