17.6. Validation.xml file

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: