Konrad Windszus created SLING-4013:
--------------------------------------

             Summary: 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: Extensions
            Reporter: Konrad Windszus


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)

Reply via email to