<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!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">

<!--
    Validation Rules for the Struts MailReader Web Application

    $Id$
-->

<form-validation>

    <!-- ==== Default Language Form Definitions ==== -->
    <formset>
        <form
                name="LogonForm">

            <field
                    property="username"
                    depends="required">
                <arg
                        key="prompt.username"/>
            </field>

            <field
                    property="password"
                    depends="required, minlength,maxlength">
                <arg
                        key="prompt.password"/>
                <arg
                        key="${var:minlength}"
                        name="minlength"
                        resource="false"/>
                <arg
                        key="${var:maxlength}"
                        name="maxlength"
                        resource="false"/>

                <var>
                    <var-name>
                        maxlength
                    </var-name>
                    <var-value>
                        16
                    </var-value>
                </var>
                <var>
                    <var-name>
                        minlength
                    </var-name>
                    <var-value>
                        3
                    </var-value>
                </var>
            </field>

        </form>

        <form
                name="RegistrationForm">

            <field
                    property="fromAddress"
                    depends="required,email">

                <arg
                        key="prompt.fromAddress"/>
            </field>

            <field
                    property="fullName"
                    depends="required">

                <arg
                        key="prompt.fullName"/>

            </field>

            <field
                    property="replyToAddress"
                    depends="email">

                <arg
                        key="prompt.replyToAddress"/>
            </field>

            <field
                    property="username"
                    depends="required">
                <arg
                        key="prompt.username"/>
            </field>

        </form>

        <form
                name="SubscriptionForm">

            <field
                    property="host"
                    depends="required">
                <arg
                        key="prompt.mailHostname"/>
            </field>

            <field
                    property="username"
                    depends="required">
                <arg
                        key="prompt.mailUsername"/>
            </field>

            <field
                    property="password"
                    depends="required">
                <arg
                        key="prompt.mailPassword"/>
            </field>

        </form>
    </formset>
</form-validation>
