This page illustrates the ValidatedText and ValidatedForm components. ValidatedText allows a web developer to apply simple client side validation on a Text field.
Validation types available are "Required", and "Expression" (or both). Required means that an entry must be made into the text field. With "Expression", the designer may specify an arbitrary expression, using "obj" to reference the JavaScript text object.
Validation can be defined to take place on the "onchange" event (user hits return or shifts focus elsewhere after altering field value), on the "onblur" event (user shifts focus away from field), or on the "onsubmit" event of the enclosing form (user hits a "Submit" HTML Form button, or user hits return at last form field of form).
ValidatedText is implemented as a JavaScript component which emits an "<INPUT type=TEXT...>" HTML form element. Because its placement determines the location of the resulting text field, it must be placed inside an HTML "<FORM>".
The ValidatedForm component is an HTML Form with an event handler defined for its onsubmit event. It must be the enclosing form if any of the contained ValidatedText components have "validate onsubmit" set to TRUE.
Required; onblur
obj.value > 44; onchange
Required & obj.value != "foo"; onsubmit
obj.value == "bar"; onblur and onsubmit