[ 
https://issues.apache.org/jira/browse/SLING-2803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616296#comment-13616296
 ] 

Radu Cotescu commented on SLING-2803:
-------------------------------------

I have started working on a basic Validation module [2] with the following 
features:

1. ValidationModels are provided for resource types
2. a ValidationService is responsible for picking up the correct 
ValidationModel for a certain resource type
3. the ValidationModel knows what properties a resource should have and how 
their values should look like
4. the ValidationModel in turn uses Validators for validating a single piece of 
data
5. after a validation, the ValidationModel provides a list of ValidationResults 
which can be used to provide feedback to the user

Currently I haven't hooked up the Validation module to any core servlet, but 
I've created some testing services in 
org.apache.sling.launchpad.testservice.validation and an integration test in 
org.apache.sling.launchpad.webapp.integrationtest.validation.

Please share your thoughts / ideas.

[2] - 
https://github.com/raducotescu/sling/commit/844a2dba7c7f122dcf43d0801826456fd1b7f306
                
> Create a Validation module capable of validating POST requests or Resources
> ---------------------------------------------------------------------------
>
>                 Key: SLING-2803
>                 URL: https://issues.apache.org/jira/browse/SLING-2803
>             Project: Sling
>          Issue Type: New Feature
>            Reporter: Radu Cotescu
>
> Several Sling users have asked in the past [1] about a Validation mechanism 
> in Sling that's able to validate data coming from the user. However, such a 
> module is still missing.
> This issue is meant to track the work progress on such a module.
> Ideally the module should be able to validate both request parameters and 
> Resources, by obtaining their properties via a ValueMap and provide feedback 
> in case of a validation error.
> [1] - http://sling.markmail.org/search/?q=validation

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to