did you activate the plugin in struts-config? Maybe a typo? Struts 1.1 already contains the activated plugin and there is an example war where you might want to copy paste some lines.
Dirk Behrendt wrote:
Hello!
I have a problem in using the Validator framework with Struts.
I want to check textfields.
When I start Tomcat, I got a lot of parse erros like this:
element type "plug-in" must be declared. org.xml.SAXParseException
I looked at other validation examples, but I did the same like in these
examples. What is the general problem of such errors?
Thanx!
Dirk
struts-config.xml -----------------
<form-bean name="loginForm"
type="org.apache.struts.webapp.validator.RegistrationForm"/>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/> </plug-in>
validation.xml --------------
<form name="loginForm">
<field property="login"
depends="required,mask">
<arg0 key="lable.login"/> <var>
<var-name>mask</var-name>
<var-value>^[a-zA-Z0-9_.-]*$</var-value>
</var> </field> <field property="password"
depends="required,mask">
<arg0 key="lable.password"/> <var>
<var-name>mask</var-name>
<var-value>^[a-zA-Z0-9_.-]*$</var-value>
</var> </field> </form>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]