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

[jira] [Assigned] (SLING-4013) Allow validator to act on non-required properties

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

Konrad Windszus reassigned SLING-4013:
--------------------------------------

    Assignee: Konrad Windszus

> Allow validator to act on non-required properties
> -------------------------------------------------
>
>                 Key: SLING-4013
>                 URL: https://issues.apache.org/jira/browse/SLING-4013
>             Project: Sling
>          Issue Type: Improvement
>          Components: Validation
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>              Labels: validation
>             Fix For: Validation 1.0.0
>
>
> Currently all properties which are bound to a validator are automatically mandatory (https://github.com/apache/sling/blob/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java#L384), i.e. if the property is not set a validation error will occur. 
> In some cases the property is not required but if it is there (and not empty) it should be valid according to the validator. 
> I propose a new attribute {{propertyOptional}} with a boolean value below the properties node of a validation node. The default should be false (i.e. property is required)



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