You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jimmi Dyson <ji...@lawton.co.uk> on 2006/01/30 18:37:16 UTC

fValidate for Tapestry

I have just started a project on java.dev.net to integrate fValidate
with Tapestry, fValidate being a great client-side JavaScript validation
library. It is in the process of being approved, but if anyone is
interested in the source code its in CVS.

The project URL is http://tapestryfvalidate.dev.java.net/. You need to
log in at the moment as it is being approved, but will be fully
accessible later.

I think that fValidate integration is a great addition to Tapestry. It
only took a few hours to integrate, which I think is a great testament
to Tapestry's flexibility. It would have taken a lot less if I had been
up to speed with Tapestry's internal workings!

This integrates with Tapestry seamlessly, not touching the server-side
validation at all, but rather just disabling the built-in client-side
validation in favour of fValidate validation.

fValidate just requires an extra few attributes in the HTML on the
fields that are to be validated - I have set this to 'fval' and 'emsg'.
'fval' is the type of client-side validation and 'emsg' is a
customisable error message. Obviously this isn't valid XHTML so I have
extended the XHTML 1.1 DTD to allow this to be validated. The DTD for
this is at
http://tapestryfvalidate.dev.java.net/public/DTD/xhtml11-fvalidate.dtd.

I have attached an example page that uses fValidate to validate a UK
postcode and an e-mail address.

Any comments would be greatly appreciated.

Cheers,
Jim