cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: XML Form, extended validation and error messages
Date Mon, 15 Jul 2002 13:42:33 GMT
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: <michael_hampel@sonynetservices.com>
To: <cocoon-users@xml.apache.org>
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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message