Hi All,
I've uploaded part of the YAML based form generation and client/server validation module I've been working on.

It's aim is make make creating forms with client and server validation very easy, and ultra easy to keep up to date. Once setup all you need to do is edit the central YAML schema to add/remove/edit form fields and the server and client validation is automatically updated.

Background:
I'm working on a large project with a lot of config forms. The usual process of updating HTML, JavaScript, DFV profile then finally Perl code is simply not feasible and would be far to time consuming. So I've created this module so all this can be done by editing one YAML file.

Issues it resolves:
Newer versions of DFV use compiled regexps and closures. These are great for the server side Perl validation but no longer exportable to the client side Data.FormValidator.js validation. As GenVal has all the validation regexps and method names in the YAML, is uses this to create the compiled regexps and closures for the Perl validation and also downgrades them to normal regexps and methods for the JS validation. I've also updated Data.FormValidator.js so that it displays errors in the exact same way as the Perl DFV. I've made newer DFV methods that are only available as closures, such as FV_eq_with, available in Data.FormValidator.js. This is possible because GenVal downgrades the new closure methods to the old format that Data.FormValidator.js can understand.

This is only alpha release, so will probably have a few bugs while I work on it. But I thought I'd put it out there for people to see.

I've got another version that has all the mysql database schema in the YAML as well. It creates/updates the database tables as needed, so you no longer need to write and DB upgrade routines when you change your forms and data. This isn't released yet though.


Feedback much appreciated.


Lyle


#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to