<PowerForms>


PowerForms is a tool for extending HTML forms with client-side input validation. The validation requirements are stated in a declarative manner, that is, one tells what should hold for certain form fields rather than telling how to check whether it holds.

In PowerForms, requirements are called formats and they are built from regular expressions together with constructs for specifying dependencies among different form fields. When a format is associated with a form field the field will continously be checked to see if its value meets the given requirement.

A client-side user can only submit a form when all requirements are met, and an attempt to submit an invalid form will result in an appropriate error message.

PowerForms relies on standard scripting technology (JavaScript) in modern browsers and for compatibility only the subset known to work in most browsers are used. (The generated code has been succesfully tested in Netscape 4 under Unix, Mozilla under Linux, and MS Explorer under Windows.)


Short Introduction

Assume that a web-programmer, for some reason, wants the user to enter a year in the 20th century, ie. 1901-2000, in a field on a form. The programmer can then add the following to his HTML file:

<format field="year">
    <interval low="1900" high="2001" />
</format

This states that the field named year must contain a number ranging from 1901 through 2000 to be valid. The user will not be able to submit the form until the format is satisfied.

When the initially sees the HTML page he will see something like this:

Year: yellow

The yellow "traffic light" (status image) shows that the field contains incomplete input and that the input can be made valid by adding to it.

If the user has been properly instructed - and complies - he will enter, say, 1975 and the status image will change accordingly:

Year: yellow          . . . becomes . . .          Year: green

If the user enters more data the status image will change to show that something is wrong:

Year: red

The red light indicates that the input is invalid and that some of it must be removed to make it valid.


syntax extra features examples download
Syntax Extra features Examples Download

Research Paper

For more information on the ideas behind PowerForms, we refer to the research paper: "PowerForms: Declarative Client-side Form Field Validation"


bigwig@brics.dk
Last updated: November 1, 2001
Valid HTML 4.01!