cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <pguill...@soociety.com>
Subject Client side validation for CForms
Date Sun, 06 Feb 2005 12:58:39 GMT
Hi all,

My idea is to systematically use server-side validation as it is 
necessary, + some client-side to be confortable for the user.
I used the (great) patch found in 
http://issues.apache.org/bugzilla/show_bug.cgi?id=32419. 
Anyway i get trouble when i think about string lenght limitation.
The main hack in this patch is this:
        <xsl:for-each select="..//fi:field">
          validation_register_widget( '<xsl:value-of select="@id"/>',
                                      <xsl:if 
test="@required='true'">true</xsl:if>,
                                      '<xsl:value-of 
select="fi:datatype/@type"/>',
                                      '<xsl:value-of 
select="fi:datatype/fi:convertor/@pattern"/>' );
        </xsl:for-each>

Problem:  fi:validation/fd:length/@max seems not to be disponible in 
output of the  CForm transformer.

that part is a big one! So i ask if somebody has another idea/did it/ or 
can give me hints to do it.

Regards,

Phil

Mime
View raw message