In a previous section, we defined that our (dbform) form would be associated to an [entry] called 'bugs'. The 'bugs' form contained a single textField entry (referring to 'title'). Let's take a look at the resulting Validation.xml file:
<formset> <form name="bugs"> <field property="title" depends="required,mask,maxlength"> <msg name="required" key="errors.required" resource="true"/> <arg0 name="required" key="bugsForm.title.displayname" resource="true"/> <msg name="mask" key="bugsForm.error.title.mask" resource="true"/> <msg name="maxlength" key="errors.maxlength" resource="true"/> <arg0 name="maxlength" key="bugsForm.title.displayname" resource="true"/> <arg1 name="maxlength" key="${var:maxlength}" resource="false"/> <var> <var-name>mask</var-name> <var-value>^[A-Z][A-Za-z0-9\s]*$</var-value> </var> <var> <var-name>maxlength</var-name> <var-value>10</var-value> </var> </field> </form> </formset>
Its content may be summarized as follows:
The formset is not associated to any country or language therefore it will be used for all locales.
The 'value' input in the (dbForms) TextField which represents the 'title' column will be validated as follows:
Value is required
Value must start with an uppercase character and contain alphanumeric characters only.
Value+ must not contain more then 10 characters.
Most messages (and arguments) are resolved using i18n except for 'arg1' of 'maxlength' which uses a locally-defined variable.