validator_1_0.dtd
validator_1_0.dtd
DTD for the Validator Rules Configuration File, Version 1.0
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.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
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 |
|
| Name | Cardinality |
|
| formset | Any number |
| global | Any number |
|
Element's model :(global*,formset*)
The elements defined here are all global and must be nested within a
"global" element.
Element's model :(validator*,constant*)
The "validator" element defines what validators objects can be used with
the fields referenced by the formset elements. The validator element can
accept 4 properties: name, classname, method, methodparams, msg, depends,
and jsFunctionName.
| <validator>'s children |
|
| Name | Cardinality |
|
| javascript | One or none |
| |
Element's model :(javascript?)
Sorry, no documentation.
Required
Sorry, no documentation.
Required
Sorry, no documentation.
Required
Sorry, no documentation.
Required
Sorry, no documentation.
Required
Sorry, no documentation.
Sorry, no documentation.
The "javascript" element defines a JavaScript that can be used to perform
client-side validators.
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.
Element's model :(constant-name,constant-value)
Sorry, no documentation.
Sorry, no documentation.
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 |
|
| Name | Cardinality |
|
| constant | Any number |
| form | At least one |
| |
Element's model :(constant*,form+)
Sorry, no documentation.
Sorry, no documentation.
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 |
|
| Name | Cardinality |
|
| field | At least one |
|
| <form>'s attributes |
|
| Name | Values | Default |
|
| name | | |
|
Element's model :(field+)
Sorry, no documentation.
Required
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 can accept up to 4
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 |
|
| Name | Cardinality |
|
| arg0 | Any number |
| arg1 | Any number |
| arg2 | Any number |
| arg3 | Any number |
| msg | Any number |
| var | Any number |
| |
Element's model :(msg | 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.
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.
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 up to three 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]
This tag is always empty.
The name of the validator corresponding to this msg.
The key that will return the message template from a
resource bundle.
|
resource |
Attribute of msg
|
If set to "false", the key is taken to be a literal
value rather than a bundle key.
[true]
The "arg0" element defines the first replacement value to use with the
message template for this validator or this field.
The arg0 element accepts up to three 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]
This tag is always empty.
The name of the validator corresponding to this msg.
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]
The "arg1" element defines the second replacement value to use with the
message template for this validator or this field.
The arg1 element accepts up to three 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]
This tag is always empty.
The name of the validator corresponding to this msg.
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]
The "arg2" element defines the third replacement value to use with the
message template for this validator or this field.
The arg2 element accepts up to three 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]
This tag is always empty.
The name of the validator corresponding to this msg.
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]
The "arg3" element defines the fourth replacement value to use with the
message template for this validator or this field.
The arg0 element accepts up to three 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]
This tag is always empty.
The name of the validator corresponding to this msg.
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]
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}.
Element's model :(var-name,var-value)
The name of the var parameter to provide to a field's validators.
The value of the var parameter to provide to a field's validators.