You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Mark R. Diggory" <md...@latte.harvard.edu> on 2003/08/26 15:35:51 UTC

[input] questions about status

Hi folks,

I'm curious about the status of the input taglibrary, mainly because I 
have my own lib that is called "validation" which acts a wrapper tags 
around form fields to provide user validation for form content (plus 
retention of form field values submitted by user, and conditional logic 
tags to control error display for various fields. It works a bit 
differently than input does.

<v:validate id="foo">
    <v:if_valid>
       <!--
       executed only if "required" conditions are met.
       could forward or redirect to a resource, or handle logic
       directly
       -->
    </v:if_valid>

    <form action="" method="GET|POST">

       <v:required name="email" match='.+@.+\..'>

          <input type="text" name="email" value="<%=value%>"/>

          <input:if_not_formated>
             (*) not a valid email.
          </input:if_not_formated>

          <v:if_empty> * You must provide .</v:if_empty>

          <v:if_absent> * required.</v"if_absent>

       </v:required>

       <v:required name="submit">
          <input type="submit" name="submit" value="Send"/>
       </v:required>
    </form>

</v:validate>


This basically provides empty, absent and format checking capabilities 
for request parameters. It uses regexp.jar to to regular expression 
checking.

The powerful feature of this taglibrary is that as "wrappers" there is 
no concern for "presentation" involved with the library, and it can be 
used with more html editors like dream weaver relatively easily.

I'd like to get it working with JSP 2.0, JSTL and multipart file posts 
as well in the near future using either FileUpload or the COS Multipart 
parser package.

Is there any interest in this?
-Mark Diggory
Harvard MIT Data Center