Custom Validation to Asset Metadata | Community
Skip to main content
Level 6
February 19, 2021
Solved

Custom Validation to Asset Metadata

  • February 19, 2021
  • 2 replies
  • 1559 views

I need to add custom validation to a field in the asset metadata editor schema (Dropdown). I created clientlib (category = xyz) and js files under /apps (the JS file is only having a console.log). To the dropdown node I added property 'extraclientlibs' and value 'xyz'. I added a 'granite:data' node as a child node to the dropdown.

But the JS doesnt load.

Where do we need to add the JS to be able to validate a field in asset metadata schema?

(i was working on /conf/global/settings/dam/adminui-extension/metadataschema/default/application/items/tabs/items path)

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anudeep_Garnepudi

@shaheena_sheikh 

Add extraClientlibs property to cq:dialog node and the property name "extraClientlibs" is case sensitive.

Try

  • Create a node(nt:unstructured) with name clientlibs under tab
  • Add property sling:resourceType (String) with value granite/ui/components/coral/foundation/includeclientlibs
  • Add property js (String) with custom clientlib category as value

2 replies

Anudeep_Garnepudi
Community Advisor
Anudeep_GarnepudiCommunity AdvisorAccepted solution
Community Advisor
February 19, 2021

@shaheena_sheikh 

Add extraClientlibs property to cq:dialog node and the property name "extraClientlibs" is case sensitive.

Try

  • Create a node(nt:unstructured) with name clientlibs under tab
  • Add property sling:resourceType (String) with value granite/ui/components/coral/foundation/includeclientlibs
  • Add property js (String) with custom clientlib category as value
AG
Level 6
February 19, 2021
there is no dialog node in Metadata schema of asset
Level 6
February 19, 2021
The solution is to add the category as dam.gui.coral.<name here> and it gets loaded!