struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelly Goedert <kelly.goed...@nexxera.com>
Subject validation problem
Date Fri, 16 Jan 2004 10:24:54 GMT
Hi,

I'm trying to use the validator in a form that is used in as login form 
for authentication.
And the fields are not being checked.

I have this mapping on struts-config.xml

<!-- Form Bean Definitions -->
    <form-beans>
        <form-bean name="loginForm" 
type="org.apache.struts.validator.DynaValidatorForm">
            <form-property name="txtLogin" type="java.lang.String"/>
            <form-property name="pwdSenha" type="java.lang.String"/>
        </form-bean>
    </form-beans>

        <action path="/login"
            type="LoginAction"
            name = "loginForm"
            scope="request"
            input="/login.jsp"
            validate="true">
            <forward
                name="continue"
                path="/pages/principal.jsp"/>
            <forward
                name="erro"
                path="/login.jsp"/>
        </action>

In the validation.xml I have this:

<form-validation>
    <formset>
        <form name="loginForm">
            <field property="txtLogin"
                depends="required">
                <arg0 key="login.display"/>
            </field>
            <field property="pwdSenha"
                depends="required">
                <arg0 key="senha.display"/>
            </field>
        </form>
    </formset>   
</form-validation>

Why the fields are not checked??


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message