struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: Problem in using Validator Framework with Struts
Date Tue, 29 Jul 2003 21:08:25 GMT
Make sure your doctype is correct:

<!DOCTYPE struts-config PUBLIC
       "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

David


--- Dirk Behrendt <schnoerk@web.de> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
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