fValidate - a Kick-Ass JavaScript Validation Library
I found this gem from Ben Alex on the Spring Forums tonight. fValidate looks to be an awesome client-side validation library. If you do a view-source on the aforementioned page, you'll see that all the validation rules are specified in the "alt" attribute of input elements. Apparently this is XHTML valid. Since the current implementation of WebWork in AppFuse doesn't have client-side validation, I may have to hack something together tonight. From the looks of it, this will simply involve adding an "alt" attribute to the existing WebWork tags.
Later: I think I'll pass on the AppFuse/WebWork integration - it looks like a fair amount of work and I'd rather just get 1.6 finished and released.
<@fremerx.formInput "address.addressLine1">
alt="blank"
class="required"
emsg="${springMacroRequestContext.getMessage("required.addressLine1")}"
maxlength="50"
tabindex="1"
</@fremerx.formInput>
(The above is a FreeMarker macro which delegates to resource files for localisation of labels, field help, accesskeys etc.)
Whilst on the subject of pretty good (tm) JavaScript libraries, for client-side table sorting we're using http://webfx.eae.net/dhtml/sortabletable/sortabletable.html. There is a demo link at the bottom of the page. There are many sortable table implementations floating around, but this one happily lives within an XHTML doctype and has a documented API.
Posted by Ben Alex on October 09, 2004 at 06:47 AM MDT #
Posted by francisco hernandez on October 09, 2004 at 07:18 AM MDT #
Posted by Lars Fischer on October 09, 2004 at 01:57 PM MDT #
Posted by Ben Alex on October 09, 2004 at 10:17 PM MDT #
Posted by Juha Komulainen on October 10, 2004 at 09:37 AM MDT #
fvalidate.config.js:
// Attribute used for fValidate Validator codes
this.code = 'alt';
// Attribute used for custom error messages (override built-in error messages)
this.emsg = 'emsg';
Posted by Rafael Muñoz on October 13, 2004 at 08:34 AM MDT #
Posted by Patrick Lightbody on October 13, 2004 at 03:23 PM MDT #
Posted by Paul Barry on October 19, 2004 at 11:12 PM MDT #
Posted by Ben Alex on October 29, 2004 at 12:28 AM MDT #
Posted by Mohammed Imtiyaz on October 13, 2005 at 10:37 AM MDT #
Posted by 85.165.50.218 on March 10, 2006 at 10:07 PM MST #
Posted by 203.199.250.194 on May 11, 2007 at 05:28 AM MDT #
Posted by anonymous on June 01, 2007 at 09:10 PM MDT #
para insertar los errores en una misma pagina.....pero es una buneisima herramienta the problem in FValidate is u cant use multiple tag
in the same page, but is a toooo good
Posted by Ronhead on October 09, 2007 at 08:23 PM MDT #