Yes.Thanks, but sorry but ididnt quite get. Though i dont have an application yet for this but what i have in mind is like this.
Extend the DynaValidator
override the validate method
validate(...) {
ActionErrors errors = super.validate(...);
// do your stuff if (...) { errors.add(...); }
return errors; }
Pedro Salgado
On 04/05/03 9:40, "Eric Noel" <[EMAIL PROTECTED]> wrote:
Is it possible to use both Strut's Validator Framework for some fields and validate other fields using my own validation via ActionForm class. If yes, can someone site an example.
--------------------------------------------------------------------- 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]
1.) Form1 action=Form1 - the form for the 2 fields
2.) field 1 - will be initially validated by the Struts framework then passed to my LookupDispatchAction for my db validation
2.) field2 - will be validated using my own ValidatorForm then passed to my LookupDispatchAction for more db validation
what should i use on my struts-config, im quite confused now what to use on my struts-config?
<form-bean name="Form1"
type="org.apache.struts.action.DynaActionForm">
<form-property name="fiedl1"
type="java.lang.String"
initial="testfieldvalue1"/>
</form-bean>
<action path="/Form1" type="test.Form1Action" name="form1Form" parameter="method" input="/testform.jsp" scope="request" validate="false"> <forward name="failure" path="/testform.jsp"/> <forward name="success" path="/formsuccess.jsp" /> </action>
or
<form-bean name="inputForm" type="test.InputForm"/>
<action path="/Form1" type="test.InputAction" name="inputForm" scope="request" validate="true" input="/input.jsp"> <forward name="success" path="/success.jsp" /> </action>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]