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.
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:
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:
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:
If the user enters more data the status image will change to show that something is wrong:
The red light indicates that the input is invalid and that some of it must be removed to make it valid.
For more information on the ideas behind PowerForms, we refer to the research paper: "PowerForms: Declarative Client-side Form Field Validation"