Thanks Paul for your input on this issue and
Thanks Wendy for suggesting the following link.

> Rick has an article on calling validation manually, here:
>   http://learntechnology.net/validate-manually.do
>

I understand this stuff
--------
ActionErrors errors = form.validate( mapping, request );
        if ( errors != null && !errors.isEmpty() ) {
            saveErrors(request, errors);
            setUp(request);
            return (mapping.findForward(UIconstants.VALIDATION_FAILURE));
        }
----------
I only have one issue with this approach. I dont know how to make use of the built-in validation rules provided in validation-rules.xml in my .java code.
I can check for simple things like not-null, not-empty etc. but checking
something like "email" field will be easier if I could leverage the rules provided by Struts validation framework in validator-rules.xml.

Is there a way to do this ?
Essentially I want to use validation rules like "email", "mask" from validator-rules.xml while writing my Action or ActionForm java code.



Any pointers ?
regards,
robin.




Wendy Smoak wrote:
On 11/23/06, robinbajaj <[EMAIL PROTECTED]> wrote:

Hi Folks,
My previous post's subject was not clear. So here's a re-phrase of the
problem.
--------
My loyaltyPAge.jsp has two buttons - Exit and continue.

I want the validation to occur only when "Continue" is clicked upon.
But the <html:form in the jsp points to one actionmapping
having "validate=true" - that's why the Struts validation framework
tries to validate the input fields regardless of which button is clicked.

Rick has an article on calling validation manually, here:
  http://learntechnology.net/validate-manually.do


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to