Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Custom Validation to Asset Metadata

Avatar

Level 6

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)

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

@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

Avatar

Level 6
The solution is to add the category as dam.gui.coral.<name here> and it gets loaded!