[xwiki-devs] [Proposal] Add LiveValidate Javascript library for validating form fields.
My registration template provides the option of client side validation using the LiveValidate library. In order to turn this functionality on by default we would have to bundle the library with XWiki. The library is licensed under the MIT license: http://livevalidation.com/license and weighs in at 12.5KB when minified. I would like to add: resources/js/yui/livevalidation/livevalidation_prototype.compressed.js and a stylesheet which was posted to the incubator by Jerome Velociter resources/js/yui/livevalidation/livevalidation_style.css Caleb James DeLisle
On Jan 22, 2010, at 9:10 PM, Caleb James DeLisle wrote:
My registration template provides the option of client side validation using the LiveValidate library. In order to turn this functionality on by default we would have to bundle the library with XWiki. The library is licensed under the MIT license: http://livevalidation.com/license and weighs in at 12.5KB when minified. I would like to add: resources/js/yui/livevalidation/livevalidation_prototype.compressed.js and a stylesheet which was posted to the incubator by Jerome Velociter resources/js/yui/livevalidation/livevalidation_style.css
Would the loading of live validation be conditional using jsx (ie not loaded by default for all pages)? I have no knowledge of JS validation libraries so I'll trust the experts. Thanks -Vincent
I cant't look at the tool in question right now but its place is not under YUI in our resources, it should have is own /resources/js/livevalidation/ directory imho. JV. On Fri, Jan 22, 2010 at 9:10 PM, Caleb James DeLisle <[email protected]> wrote:
My registration template provides the option of client side validation using the LiveValidate library. In order to turn this functionality on by default we would have to bundle the library with XWiki. The library is licensed under the MIT license: http://livevalidation.com/license and weighs in at 12.5KB when minified. I would like to add: resources/js/yui/livevalidation/livevalidation_prototype.compressed.js and a stylesheet which was posted to the incubator by Jerome Velociter resources/js/yui/livevalidation/livevalidation_style.css
Caleb James DeLisle
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
/yui/ == my mistake not knowing it's a framework. /resources/js/livevalidation/ it is. " Would the loading of live validation be conditional using jsx (ie not loaded by default for all pages)? I have no knowledge of JS validation libraries so I'll trust the experts. Thanks -Vincent " Yes, conditional loading with jsx. Caleb Jean-Vincent Drean wrote:
I cant't look at the tool in question right now but its place is not under YUI in our resources, it should have is own /resources/js/livevalidation/ directory imho.
JV.
On Fri, Jan 22, 2010 at 9:10 PM, Caleb James DeLisle <[email protected]> wrote:
My registration template provides the option of client side validation using the LiveValidate library. In order to turn this functionality on by default we would have to bundle the library with XWiki. The library is licensed under the MIT license: http://livevalidation.com/license and weighs in at 12.5KB when minified. I would like to add: resources/js/yui/livevalidation/livevalidation_prototype.compressed.js and a stylesheet which was posted to the incubator by Jerome Velociter resources/js/yui/livevalidation/livevalidation_style.css
Caleb James DeLisle
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi devs, Hi Caleb Why not create a LiveValidation Application before adding it to the core? Also there are some leftovers in resources like YUI at an obsolete version... and one more thing, i found nothing about their(LiveValidation) bugs management. Maybe we should think about this, and if the LiveValidation Application with this javascript library becomes mature/tested and has an maintainer could go into XWiki Core. Thanks, this is my view on this. Flavius Olaru
Flavius Olaru wrote:
Hi devs, Hi Caleb
Why not create a LiveValidation Application before adding it to the core? There is an application here: http://incubator.myxwiki.org/xwiki/bin/view/XWiki/LiveValidation The idea of a template (registerinline.vm) calling an application seems backward to me.
Also there are some leftovers in resources like YUI at an obsolete version... It was my mistake proposing it go in the yui folder, It doesn't depend on yui so it should be in it's own folder.
and one more thing, i found nothing about their(LiveValidation) bugs management. You make a very good point. I think it's also important to note that the code is under 900 lines fully documented, it contains 1200 lines of unit tests, it will only be used on pages which call it via jsfx.use and it is not intended for security as nefarious users may simply turn off javascript.
Maybe we should think about this, and if the LiveValidation Application with this javascript library becomes mature/tested and has an maintainer could go into XWiki Core.
Thanks, this is my view on this. Flavius Olaru I appreciate your input.
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 01/22/2010 11:47 PM, Caleb James DeLisle wrote:
Flavius Olaru wrote:
Hi devs, Hi Caleb
Why not create a LiveValidation Application before adding it to the core? There is an application here: http://incubator.myxwiki.org/xwiki/bin/view/XWiki/LiveValidation The idea of a template (registerinline.vm) calling an application seems backward to me.
I second Caleb, this is a functionality used by other applications and even platform elements, so it should also be in the platform.
Also there are some leftovers in resources like YUI at an obsolete version... It was my mistake proposing it go in the yui folder, It doesn't depend on yui so it should be in it's own folder.
I prefer something like resources/uicomponents/widgets/validation/
and one more thing, i found nothing about their(LiveValidation) bugs management. You make a very good point. I think it's also important to note that the code is under 900 lines fully documented, it contains 1200 lines of unit tests, it will only be used on pages which call it via jsfx.use and it is not intended for security as nefarious users may simply turn off javascript.
We have other small "tools" that don't have a community and advanced stuff like version control, tracker and mailing lists. IMO, this is normal, and acceptable. Such a tool usually has less than 1k likes of code, so there's not much to maintain. If there are bugs or compatibility issues, a mail to the author with either a bugfix request or a patch should be enough. But yes, the bug management question is a very good one, and one we usually consider for larger libraries/tools.
Maybe we should think about this, and if the LiveValidation Application with this javascript library becomes mature/tested and has an maintainer could go into XWiki Core.
Thanks, this is my view on this. Flavius Olaru I appreciate your input.
Caleb
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Sat, Jan 23, 2010 at 2:59 AM, Sergiu Dumitriu <[email protected]> wrote:
On 01/22/2010 11:47 PM, Caleb James DeLisle wrote:
Flavius Olaru wrote:
Hi devs, Hi Caleb
Why not create a LiveValidation Application before adding it to the
core?
There is an application here: http://incubator.myxwiki.org/xwiki/bin/view/XWiki/LiveValidation The idea of a template (registerinline.vm) calling an application seems backward to me.
I second Caleb, this is a functionality used by other applications and even platform elements, so it should also be in the platform.
I am not against adding a javascript library that is required by the platform or other applications, the fact that this library had a missing transparent bugs/issues management raised some questions.
Also there are some leftovers in resources like YUI at an obsolete version... It was my mistake proposing it go in the yui folder, It doesn't depend on yui so it should be in it's own folder.
I prefer something like resources/uicomponents/widgets/validation/
What about "resources/uicomponents/widgets/livevalidation/" ?
and one more thing, i found nothing about their(LiveValidation) bugs management. You make a very good point. I think it's also important to note that the code is under 900 lines fully documented, it contains 1200 lines of unit tests, it will only be used on pages which call it via jsfx.use and it is not intended for security as nefarious users may simply turn off javascript.
We have other small "tools" that don't have a community and advanced stuff like version control, tracker and mailing lists. IMO, this is normal, and acceptable. Such a tool usually has less than 1k likes of code, so there's not much to maintain. If there are bugs or compatibility issues, a mail to the author with either a bugfix request or a patch should be enough.
But yes, the bug management question is a very good one, and one we usually consider for larger libraries/tools.
I took the time and tested it on Windows with their tests page. Firefox 3.5, MSIE 6, 7, 8, Google Chrome and Safari: All tests passed... a good thing. :) Opera 10: 51 tests, 184 assertions, 45 failures, 0 errors (I've submitted them the tests results) http://livevalidation.com/testprototype Maybe if someone has the time to check it on Mac and Linux and post here if the findings would be great. I also found a fork on github, it has some few more lines than the original library and is versioned as 1.4 as opposed the original at 1.3. Maybe when i get the time i will have a better look on that. http://github.com/grockit/livevalidation -- Flavius Olaru
On 01/22/2010 09:10 PM, Caleb James DeLisle wrote:
My registration template provides the option of client side validation using the LiveValidate library. In order to turn this functionality on by default we would have to bundle the library with XWiki. The library is licensed under the MIT license: http://livevalidation.com/license and weighs in at 12.5KB when minified. I would like to add: resources/js/yui/livevalidation/livevalidation_prototype.compressed.js and a stylesheet which was posted to the incubator by Jerome Velociter resources/js/yui/livevalidation/livevalidation_style.css
+1, but under resources/uicomponents/widgets/validation/ or resources/uicomponents/validation/ Also, I'd like to include the uncompressed version as well in the sources, or even include only the uncompressed version and let the build minify it. As the next step, it would be nice to have it wired to the validation fields in XClasses, so that it works automatically. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Sat, Jan 23, 2010 at 4:03 AM, Sergiu Dumitriu <[email protected]> wrote:
Also, I'd like to include the uncompressed version as well in the sources, or even include only the uncompressed version and let the build minify it.
+1 for including the uncompressed version in sources
As the next step, it would be nice to have it wired to the validation fields in XClasses, so that it works automatically.
+1 Or at least creating a macro that uses the validation fields in XClasses.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Flavius Olaru
On testing I would like to add: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.01 51 tests, 184 assertions, 45 failures, 0 errors while... Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10 51 tests, 229 assertions, 0 failures, 0 errors This seems good. -- Flavius Olaru
On 01/23/2010 03:51 AM, Flavius Olaru wrote:
On testing I would like to add:
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.01 51 tests, 184 assertions, 45 failures, 0 errors
while...
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10 51 tests, 229 assertions, 0 failures, 0 errors
This seems good.
Passes on Opera 10.10/Linux. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Passes unit tests in Firefox 3.0.1 Linux must update :) Caleb Sergiu Dumitriu wrote:
On 01/23/2010 03:51 AM, Flavius Olaru wrote:
On testing I would like to add:
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.01 51 tests, 184 assertions, 45 failures, 0 errors
while...
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10 51 tests, 229 assertions, 0 failures, 0 errors
This seems good.
Passes on Opera 10.10/Linux.
Added to web/standard/src/main/webapp/resources/uicomponents/widgets/validation commit 26331 see: http://jira.xwiki.org/jira/browse/XWIKI-4786 Unit tests still work in Linux Firefox 3.10 and Opera 9.64 after being minified at build time. Caleb Caleb James DeLisle wrote:
Passes unit tests in Firefox 3.0.1 Linux must update :)
Caleb
Sergiu Dumitriu wrote:
On 01/23/2010 03:51 AM, Flavius Olaru wrote:
On testing I would like to add:
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.01 51 tests, 184 assertions, 45 failures, 0 errors
while...
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10 51 tests, 229 assertions, 0 failures, 0 errors
This seems good. Passes on Opera 10.10/Linux.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Caleb James DeLisle -
Flavius Olaru -
Jean-Vincent Drean -
Sergiu Dumitriu -
Vincent Massol