Various tags are used within the Validation.xml file to describe validation rules. The following describes each tag in detail:
Table 17.1. Validation Tag Details
Tag Name | Description |
formset | This tag is used to support i18n. Suppose that a form is to be validated and that a field within this form is a postal code. Depending upon the locale, this postal code could have very different formats (US/Canadian/German). Multiple formset tags can be defined and each, can be associated to a different locale. Association may be defined using either of the following attributes:
|
form | This tag corresponds to the value of the dbform tag 'formValidatorName' attribute. |
field | This tag identifies the table field. (refer to dbforms-config.xml) |
depends | Defines which type(s) of validation(s) are required for the field. |
msg | This tag specifies the error message to display if the validation fails. The following attributes are required:
|
arg | Is used to pass arguments to messages. The following attributes are required:
|
var | Defines variables for use in validation. |