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

Konrad Windszus commented on SLING-4262:
----------------------------------------

After thinking a little bit further about this I came up with this 2nd proposal:

# only allow relative resource types in {{validatedResourceType}} property
# if absolute resource types are given in the 
{{ValidationService.getValidationModel()}} the prefix is compared with all 
search paths. If it matches one of the search paths, it is stripped and 
afterwards compared with the relative {{validatedResourceType}} property. If 
not an exception is thrown. 

That would mean, it is not possible to
- provide a validation model for resource types outside of the search path
- provide a validation model for resource types only in one of the search paths

> Make ValidationService.getValidationModel accept also relative resource types
> -----------------------------------------------------------------------------
>
>                 Key: SLING-4262
>                 URL: https://issues.apache.org/jira/browse/SLING-4262
>             Project: Sling
>          Issue Type: Improvement
>          Components: Validation
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>             Fix For: Validation 1.0.0
>
>
> Currently there must be a direct match between the validation models resource 
> type given in validatedResourceType and the resourceType given as a parameter 
> to {{ValidationService.getValidationModel}}.
> It would be good if in both directions also the search path of the resource 
> resolver would be considered (if one of the given values does not start with 
> a "/")



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

Reply via email to