views:

203

answers:

1

Is there a simple form validation that runs off of an XML file that controls the generation of HTML, Javascript, and PHP would actually follow the rules too?

The way its done now i have to split the two up.

+1  A: 

Not that I know of. The best I've been able to do is use the jQuery validate plugin, then make the validation rules common by making both it and my server-side validation reference the same configuration variables, which I'm passing via a $_SESSION array.

EDIT: Actually, I seem to remember that the PEAR HTML_QuickForm2 class does a reasonable job, but I rejected it for my purposes on the basis that the HTML code it produces isn't standards-compliant (to XHTML strict at least) and it doesn't allow for enough in the way of layout flexibility.

da5id