Bertrand,

I wouldn't mind taking a crack at something but I'm not sure I'd know
where to start.  I only just started looking at sling.  I wonder if you
might have some suggestions.  Here are some problems I have:

If we went with a request filter the filtered posts, the filter would
have to be able to resolve a validation resource.  It could then
validate the request.  If the validation failed, the filter would have
to know how to re-render the "edit" resource. Would the idea be to have
the posting form contain some @suffix type fields that the filter could
use to resolve the validation resource and the "edit" resource?

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Bertrand Delacretaz
Sent: Thursday, December 11, 2008 7:59 AM
To: [email protected]
Subject: Re: Data Validation

Hi Darrell,

On Tue, Dec 9, 2008 at 6:22 PM, Darrell Pittman
<[email protected]> wrote:
> ...I see what I have to do, thanks.  Is there any plan to
> incorporate some kind of validation functionality in the future?...

I don't think we have a concrete plan to do that, but a validation
framework would IMHO be a nice thing to have in Sling.

A request filter that validates request parameters, combined with a
utility that makes it easy for scripts to use request parameters
values and validation errors to fill form fields instead of using the
current node's values, is probably all that's needed. I would make the
filter generic and use OSGi services and/or server-side scripts to
define specific validations.

As usual, contributions are welcome - I don't think any of the current
committers is working on that at the moment, but if you want to
propose a solution we can certainly help with design and review.

-Bertrand

Reply via email to