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

ASF GitHub Bot commented on SLING-4010:
---------------------------------------

GitHub user kwin opened a pull request:

    https://github.com/apache/sling/pull/28

    SLING-4010, allow validator to set custom validation message

    https://issues.apache.org/jira/browse/SLING-4010

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kwin/sling SLING-4010-customvalidationmessages

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/sling/pull/28.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #28
    
----
commit 2429a21e343f62c7de9bf7ec729a8c6ecb19c044
Author: Konrad Windszus <[email protected]>
Date:   2014-10-07T20:18:50Z

    SLING-4010, allow validator to set custom validation message

----


> Allow validator to set a custom failure message
> -----------------------------------------------
>
>                 Key: SLING-4010
>                 URL: https://issues.apache.org/jira/browse/SLING-4010
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Konrad Windszus
>              Labels: validation, validator
>
> Currently the Validator may only return a boolean value or an exception in 
> case the validator was called with invalid parametrization 
> (https://github.com/apache/sling/blob/trunk/contrib/validation/api/src/main/java/org/apache/sling/validation/api/Validator.java).
> In some cases the validator could give some important information about why 
> the validation failed. This is e.g. the cause for a reference validator where 
> the cause for a failed validation could be:
> # referenced resource is not existent
> # referenced resource is not having the right resource type
> # referenced resource is not activated
> So instead of only returning a boolean value, it should also be possible to 
> return a failure message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to