This is a partial PHP port of the
CPAN Data::formValidator module. It has only a few of the options, but I figure its a good start.
The setup in your pages may seem a bit cumbersome at first, but I think you'll find that the way it lets you define constraints and dependencies makes it worth it.
The current setup lets you define
- required variables
- optional variables
- variable dependencies
- filters for the variables
- constraints for the variables
The object makes available a list of
- missing variables (required and dependencies)
- invalid variables (failed their constraint)
- filtered variables
- valid variables
I'm looking for critique/ suggestions on
- design and readability
- code efficiency
- code usefulness
- any suggestions how to validate arrays in addition to scalar vars
Thanks
