<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE form-validation PUBLIC
     "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
     "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">

<form-validation>
    <formset>
        <form name="class-name">
            <field property="field-name"></field>
        </form>

        <!-- 単項目の入力チェック -->
        <form name="userBean">
            <field property="id" depends="maxLength">
                <arg key="id" position="0" />
                <arg key="${var:maxlength}" resource="false"
                    position="1" />
                <var>
                    <var-name>maxlength</var-name>
                    <var-value>5</var-value>
                </var>
            </field>
            <field property="name" depends="required,maxLength">
                <arg key="name" position="0" />
                <arg key="${var:maxlength}" resource="false"
                    position="1" />
                <var>
                    <var-name>maxlength</var-name>
                    <var-value>20</var-value>
                </var>
            </field>
            <field property="age" depends="maxLength">
                <arg key="age" position="0" />
                <arg key="${var:maxlength}" resource="false"
                    position="1" />
                <var>
                    <var-name>maxlength</var-name>
                    <var-value>3</var-value>
                </var>
            </field>
        </form>
    </formset>
</form-validation>
