You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2014/11/12 20:45:36 UTC

[jira] [Updated] (SLING-4010) Allow validator to set a custom failure message

     [ https://issues.apache.org/jira/browse/SLING-4010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Munteanu updated SLING-4010:
-----------------------------------
    Fix Version/s: Validation 1.0.0

> 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: Validation
>            Reporter: Konrad Windszus
>            Assignee: Bertrand Delacretaz
>              Labels: validation, validator
>             Fix For: Validation 1.0.0
>
>
> 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)