One of the Cocoon BuiltInLogicsheets.

This XSP Logicsheet is designed to be used in parallel with the FormValidatorAction.

See FormValidationUsingCocoon for additional background information.

The namespace for this logicsheet is

The following sections describe the purpose of each element.


The descriptor element is required if you need to

The element has several required attributes

Other elements from the tag library should be nested inside this one, if access is required to the descriptor file.

The element can be used multiple times on the page, e.g. referencing different constraint sets.


The results element simply returns a Map of all validation results, e.g. for direct manipulation in embedded code.


A grouping element that provides a named context for other nested elements, e.g. is-ok, etc. Should have a name attribute that identifies the parameter being used.

Generally, if an element is not used within a validate element then it's context can be defined by adding a name attribute to the individual element.

Is Elements

There are several tests that can be applied to an element to determine the outcome of validation:

On Elements

Nested markup is included if the parameter was successfully validated. There are on elements for each of the scenarios listed above. E.g. on-ok, on-null, etc.

Get Attribute

The get-attribute element must have a descriptor element as an ancestor, and provides access to attributes given in the form descriptor.

There's a slight departure from the usual syntax here. The parameter being read from the descriptor file is identified by a parameter attribute. If the get-attribute element is used within a validate element, then its context will be used. The name attribute on this element identifies an attribute on the parameter in the descriptor, not the parameter itself.

Additional informations can be found on 2.1 version here

XSPFormValidator (last edited 2009-09-20 23:40:32 by localhost)