Dear devs,

I propose we bundle the "validation as you type" livevalidation.js 
library [1] in XWiki, and use it to improve user experience on several 
forms in XWiki Enterprise (I can think of registration form, export wiki 
form, page creation panel, etc.) There are several advantages I see in 
livevalidation compared to the other libraries I took a glance at :

* It's small (12Kb minified)
* It does not have any dependency (but there is version based on 
prototype available, too)
* It is not intrusive. No need to modify the html structure or to add 
css classes to input fields to add validation.
* It has an nice feature which allows you to precise the delay after 
which the validation should occur once the user stopped typing

If you want to see it "live" in XWiki, I added some basic presence, 
password confirm and email validation on the register form on 
http://incubator.myxwiki.org

CSS-class based validation seems to be in some sort of fashion, though 
I'm personally not very convince we can express all our validation using 
only class names (sounds intricate to do cross-field validation for 
example, or to validate against a custom regular expression), and for us 
it is not really an option right now, since we would need to make 
modifications in the core of XWiki for object fields displayer to add 
the proper class names to the inputs when calling APIs like $doc.display 
(or do it in javascript, but the CSS-based becomes pointless then). 
Last, if we really want class based validation, I believe building it 
with prototype and livevalidation would be very easy.

Here are the other alternative I looked at rapidly:

* JS-Validate [2] 67 Kb, requires prototype + scriptaculous, CSS-based , 
licence?
* really-easy-field-validation [3] requires prototype, CSS + JS based, 
MIT licence
* wForms [4] 81Kb minified, CSS-based , LGPL

Better alternatives you would see?

Otherwise, my +1 for livevalidation,

Regards,
Jerome.

[1] http://www.livevalidation.com/
[2] http://www.jsvalidate.com/
[3] http://tetlaw.id.au/view/javascript/really-easy-field-validation
[4] http://code.google.com/p/wforms/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to