validator_1_1.dtd

validator_1_1.dtd

DTD for the Validator Rules Configuration File, Version 1.1

To allow for XML validation of your rules configuration file, include the following DOCTYPE element at the beginning (after the "xml" declaration):

<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">



<form-validation>

The "form-validation" element is the root of the configuration file hierarchy, and contains nested elements for all of the other configuration settings.

<form-validation>'s children
NameCardinality
formsetAny number
globalAny number
Element's model :

(global*,formset*)


<global> Child of form-validation

The elements defined here are all global and must be nested within a "global" element.

<global>'s children
NameCardinality
constantAny number
validatorAny number
Element's model :

(validator*,constant*)


<validator> Child of global

The "validator" element defines what validator objects can be used with the fields referenced by the formset elements.

<validator>'s children
NameCardinality
javascriptOne or none
<validator>'s attributes
NameValuesDefault
classname
depends
jsFunction
jsFunctionName
method
methodParams
msg
name
Element's model :

(javascript?)


name Attribute of validator

Sorry, no documentation.

Required


classname Attribute of validator

Sorry, no documentation.

Required


method Attribute of validator

Sorry, no documentation.

Required


methodParams Attribute of validator

Sorry, no documentation.

Required


msg Attribute of validator

Sorry, no documentation.

Required


depends Attribute of validator

Sorry, no documentation.


jsFunctionName Attribute of validator

Sorry, no documentation.


jsFunction Attribute of validator

Sorry, no documentation.


<javascript> Child of validator

The "javascript" element defines a JavaScript that can be used to perform client-side validators.


<constant> Child of global,formset

The "constant" element defines a static value that can be used as replacement parameters within "field" elements. The "constant-name" and "constant-value" elements define the constant's reference id and replacement value.

<constant>'s children
NameCardinality
constant-nameOnly one
constant-valueOnly one
Element's model :

(constant-name,constant-value)


<constant-name> Child of constant

Sorry, no documentation.


<constant-value> Child of constant

Sorry, no documentation.


<formset> Child of form-validation

The "formset" element defines a set of forms for a locale. Formsets for specific locales can override only those fields that change. The localization is properly scoped, so that a formset can override just the language, or just the country, or both.

<formset>'s children
NameCardinality
constantAny number
formAt least one
<formset>'s attributes
NameValuesDefault
country
language
variant
Element's model :

(constant*,form+)


language Attribute of formset

Sorry, no documentation.


country Attribute of formset

Sorry, no documentation.


variant Attribute of formset

Sorry, no documentation.


<form> Child of formset

The "form" element defines a set of fields to be validated. The name corresponds to the identifer the application assigns to the form.

<form>'s children
NameCardinality
fieldAt least one
<form>'s attributes
NameValuesDefault
name
Element's model :

(field+)


name Attribute of form

Sorry, no documentation.

Required


<field> Child of form

The "field" element defines the properties to be validated. In a web application, a field would also correspond to a control on a HTML form. To validate the properties, the validator works through a JavaBean representation. The field element accepts these attributes:

property
The property on the JavaBean corresponding to this field element.

depends
The comma-delimited list of validators to apply against this field. For the field to succeed, all the validators must succeed.

page
The JavaBean corresponding to this form may include a page property. Only fields with a "page" attribute value that is equal to or less than the page property on the form JavaBean are processed. This is useful when using a "wizard" approach to completing a large form, to ensure that a page is not skipped. [0]

indexedListProperty
The "indexedListProperty" is the method name that will return an array or a Collection used to retrieve the list and then loop through the list performing the validations for this field.

<field>'s children
NameCardinality
argAny number
arg0Any number
arg1Any number
arg2Any number
arg3Any number
msgAny number
varAny number
<field>'s attributes
NameValuesDefault
depends
indexedListProperty
page
property
Element's model :

(msg | arg | arg0 | arg1 | arg2 | arg3 | var)*


property Attribute of field

The property on the JavaBean corresponding to this field element.

Required


depends Attribute of field

The comma-delimited list of validators to apply against this field. For the field to succeed, all the validators must succeed.


page Attribute of field

The JavaBean corresponding to this form may include a page property. Only fields with a "page" attribute value that is equal to or less than the page property on the form JavaBean are processed. This is useful when using a "wizard" approach to completing a large form, to ensure that a page is not skipped. [0]


indexedListProperty Attribute of field

The "indexedListProperty" is the method name that will return an array or a Collection used to retrieve the list and then loop through the list performing the validations for this field.


<msg/> Child of field

The "msg" element defines a custom message key to use when one of the validators for this field fails. Each validator has a default message property that is used when a corresonding field msg is not specified. Each validator applied to a field may have its own msg element. The msg element accepts these attributes.

name
The name of the validator corresponding to this msg.

bundle
The resource bundle name that the key should be resolved in.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

<msg>'s attributes
NameValuesDefault
bundle
key
name
resource

This tag is always empty.


key Attribute of msg

The key that will return the message template from a resource bundle.

Required


name Attribute of msg

The name of the validator corresponding to this msg.

Required


bundle Attribute of msg

The resource bundle name that the key should be resolved in.


resource Attribute of msg

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


<arg/> Child of field

The "arg" element defines a replacement value to use with the message template for this validator or this field. The arg element accepts these attributes.

name
The name of the validator corresponding to this msg. If not supplied, this argument will be used in the given position for every validator.

bundle
The resource bundle name that the key should be resolved in.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

position
The position of this replacement parameter in the message. For example, position="0" will set the first argument. [0]

<arg>'s attributes
NameValuesDefault
bundle
key
name
position
resource

This tag is always empty.


key Attribute of arg

The key that will return the message template from a resource bundle.

Required


bundle Attribute of arg

The resource bundle name that the key should be resolved in.


name Attribute of arg

The name of the validator corresponding to this msg. If not supplied, this argument will be used in the given position for every validator.


resource Attribute of arg

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


position Attribute of arg

The position of this replacement parameter in the message. For example, position="0" will set the first argument. [0]


<arg0/> Child of field

DEPRECATED Use <arg position="0"/> instead.

The "arg0" element defines the first replacement value to use with the message template for this validator or this field. The arg0 element accepts these attributes.

name
The name of the validator corresponding to this msg.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

<arg0>'s attributes
NameValuesDefault
key
name
resource

This tag is always empty.


name Attribute of arg0

The name of the validator corresponding to this msg.


key Attribute of arg0

The key that will return the message template from a resource bundle.


resource Attribute of arg0

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


<arg1/> Child of field

DEPRECATED Use <arg position="1"/> instead.

The "arg1" element defines the second replacement value to use with the message template for this validator or this field. The arg1 element accepts these attributes.

name
The name of the validator corresponding to this msg.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

<arg1>'s attributes
NameValuesDefault
key
name
resource

This tag is always empty.


name Attribute of arg1

The name of the validator corresponding to this msg.


key Attribute of arg1

The key that will return the message template from a resource bundle.


resource Attribute of arg1

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


<arg2/> Child of field

DEPRECATED Use <arg position="2"/> instead.

The "arg2" element defines the third replacement value to use with the message template for this validator or this field. The arg2 element accepts these attributes.

name
The name of the validator corresponding to this msg.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

<arg2>'s attributes
NameValuesDefault
key
name
resource

This tag is always empty.


name Attribute of arg2

The name of the validator corresponding to this msg.


key Attribute of arg2

The key that will return the message template from a resource bundle.


resource Attribute of arg2

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


<arg3/> Child of field

DEPRECATED Use <arg position="3"/> instead.

The "arg3" element defines the fourth replacement value to use with the message template for this validator or this field. The arg0 element accepts these attributes.

name
The name of the validator corresponding to this msg.

key
The key that will return the message template from a resource bundle.

resource
If set to "false", the key is taken to be a literal value rather than a bundle key. [true]

<arg3>'s attributes
NameValuesDefault
key
name
resource

This tag is always empty.


name Attribute of arg3

The name of the validator corresponding to this msg.


key Attribute of arg3

The key that will return the message template from a resource bundle.


resource Attribute of arg3

If set to "false", the key is taken to be a literal value rather than a bundle key. [true]


<var> Child of field

The "var" element can set parameters that a field may need to pass to one of its validators, such as the minimum and maximum values in a range validation. These parameters may also be referenced by one of the arg? elements using a shell syntax: ${var:var-name}.

<var>'s children
NameCardinality
var-nameOnly one
var-valueOnly one
Element's model :

(var-name,var-value)


<var-name> Child of var

The name of the var parameter to provide to a field's validators.


<var-value> Child of var

The value of the var parameter to provide to a field's validators.