Skip to content

Commit

Permalink
don't activate validation by default
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Nov 28, 2024
1 parent 0496c8c commit abba925
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<body>

<release version="2.2.4" date="not released">
<release version="2.3.0" date="not released">
<action type="add" dev="sseifert" issue="69">
Add new GraniteUI validator 'wcmio.handler.media.mediaFormat' which can be set on Media Handler File Upload or Path Field components to hook the media format validation into the GraniteUI dialog validation.
</action>
<action type="update" dev="sseifert" issue="71">
Dynamic Media with Open API: Use remote metadata call to validate and get metadata for local assets as well.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ pathFieldProps.put("required", cfg.get("required", false));
// detect root path
pathFieldProps.putAll(getDamRootPathProperties(cmp, slingRequest, "/content/dam"));
// hook media format validation in GraniteUI validation
pathFieldProps.put("validation", new String[] { "wcmio.handler.media.mediaFormat" });
// pass through validation configuration to path field
pathFieldProps.put("validation", cfg.get("validation", String.class));
Resource pathField = GraniteUiSyntheticResource.child(fileUpload, "pathfield" ,
"wcm-io/wcm/ui/granite/components/form/pathfield", new ValueMapDecorator(pathFieldProps));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ if (contentResource != null) {
}
}
// hook media format validation in GraniteUI validation
pathFieldProps.put("validation", new String[] { "wcmio.handler.media.mediaFormat" });
// simulate resource for dialog field def with updated properties
Resource pathField = GraniteUiSyntheticResource.wrapMerge(resource, new ValueMapDecorator(pathFieldProps));
Expand Down

0 comments on commit abba925

Please sign in to comment.