PowerForms: Declarative Client-Side Form Field Validation

Authors

  • Claus Brabrand
  • Anders Møller
  • Ricky Mikkel Christensen
  • Michael I. Schwartzbach

DOI:

https://doi.org/10.7146/brics.v7i43.20210

Abstract

All uses of HTML forms may benefit from validation of the specified
input field values. Simple validation matches individual values against specified formats, while more advanced validation may involve interdependencies of form fields.
There is currently no standard for specifying or implementing such validation. Today, CGI programmers often use Perl libraries for simple server-side validation or program customized JavaScript solutions for client-side validation.
We present PowerForms, which is an add-on to HTML forms that
allows a purely declarative specification of input formats and sophisticated interdependencies of form fields. While our work may be seen as inspiration for a future extension of HTML, it is also available for CGI programmers today through a preprocessor that translates a PowerForms
document into a combination of standard HTML and JavaScript that works on all combinations of platforms and browsers.
The definitions of PowerForms formats are syntactically disjoint from the form itself, which allows a modular development where the form is perhaps automatically generated by other tools and the formats and interdependencies are added separately.
PowerForms has a clean semantics defined through a fixed-point process that resolves the interdependencies between all field values. Text fields are equipped with status icons (by default traffic lights) that continuously reflect the validity of the text that has been entered so far, thus providing immediate feed-back for the user. For other GUI components the available options are dynamically filtered to present only the allowed values. PowerForms are integrated into the system for generating interactive Web services, but is also freely available in an Open Source distribution as a stand-alone package.

Downloads

Published

2000-06-13

How to Cite

Brabrand, C., Møller, A., Christensen, R. M., & Schwartzbach, M. I. (2000). PowerForms: Declarative Client-Side Form Field Validation. BRICS Report Series, 7(43). https://doi.org/10.7146/brics.v7i43.20210