Thanks for the request.

The architecturally  cleanest way is to provide your own Validator which can
use the Schematron Validator and add its own violations.

However for convenience, I have added another method to Form.

Now you can call
form.addViolations( newViolations );
where newViolations is a List of Violation.

This call should be placed in the perform method of the Actions,
which is after the form model has been populated and validated (optional) by
the provided Validator.



If this satisfies your request, please respond with SUMMARY.

Thanks,

Ivelin


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 1:03 AM
Subject: XML Form, extended validation and error messages


> Hello,
>
>   i again have a question concerning validation in connection with XMl
> forms.
>   Is there a standard way how to handle validation, that cannot be done
> with
>   the Schematron approach?
>
>  I mean something like validating if a password is already existing in a
>  database or running a Luhn Test for credit card validation.
>
>  In the moment I would do this validation in my Action that I provide for
>  the form handling (e.g.: the perform() method).
>
> What I would like to find out now is how to get error messages back
> to the page where the wrong input came from, if the validation fails.
>
> Can I access the xml file and  add an error?
>
> How is it supposed to be done?
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to