Answer the question
In order to leave comments, you need to log in
Does form-builder (PHP) + validator (client+server) exist in nature in one bottle?
Is there a flexible form-builder (PHP) that allows you to assign rules for server and client validation at the same time?
Actually, the question is not to repeat the same work twice, in particular, on Habré there has already been an attempt to comprehend this problem and one of the solutions has been proposed (or rather, its prototype) and, as they correctly noted:
the main idea is the generation of client-side validation on the server
There is not a wrapper in PHP, but an xml description of the validation rules, from which the client code is built using xsl and which can be used for server validation.
HTML_QuickForm2 is in alpha because, again, the functionality is not completed (namely, integration with javascript). But unlike the old version, it is almost 100% covered by tests and is clearly no worse in terms of stability...
Answer the question
In order to leave comments, you need to log in
For history: the issue was resolved by launching the jquickform.aberdnikov.ru project
In other words, there is a wild desire to make friends between HTML_QuickForm2 and zforms.ru, but before that I would like to ask "lazy programmers" how they deal with laziness when building forms and double work on checking input data?
did something similar for CodeIgniter, client rules were generated according to server rules, which were already fed to the mentioned Vanadium.
But it did not reach complex forms.
Have you tried this library?
code.google.com/p/php-form-builder-class/
Examples at the bottom of the page.
Have you looked in the direction of frameworks? For example, codeigniter has an option for both validation and form building - quite powerful!
I use a self-written thing to generate validation rules based on layout, though the validator is only server-side
Is it not comme il faut to validate with Ajax through the server side?
Kohana has both a form generator and a validator... But you probably need something decoupled from frameworks...
By the way, in the SVN "HTML_QuickForm2" work is already underway to implement the generation of a client-side validation script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question