struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinicius Carvalho" <java.vinic...@gmail.com>
Subject Form validation not happening
Date Mon, 03 Jul 2006 14:03:49 GMT
Hello there! I'm trying to use form validation (It was working, but
somehow, I messed something and it quit working). Here are my files:

struts-config.xml
 <form-beans>
		<form-bean name="userForm" type="com.acme.UserForm"></form-bean>
    </form-beans>

 <action path="/register" scope="request" validate="true"
type="com.acme.RegisterAction"  name="userForm"
input="/registerScreen.do">

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">

    <set-property
        property="pathnames"
        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
  </plug-in>

<form name="userForm">
   			<field property="name" depends="required">
	   			<msg name="required" key="error.nameRequired"/>
   			</field>
   			<field property="email" depends="required">
   				<msg name="required" key="error.emailRequired"/>
   			</field>
   		</form>

My UserForm extends ValidatorActionForm!

When the user submits, instead of returning to the input page and
display the errors he's redirect to the action that deals with the
register.

Any ideas?

Best regards

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


Mime
View raw message