Chad
Chad

Reputation: 9859

XML Form validation?

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.

Upvotes: 0

Views: 505

Answers (1)

da5id
da5id

Reputation: 9136

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.

Upvotes: 1

Related Questions