Forum Stats

  • 3,851,952 Users
  • 2,264,054 Discussions


Want to put validation(Maximum Characters) on custom metadata

Santanu.WCC Member Posts: 134
edited Sep 29, 2016 8:07AM in WebCenter Content

Hi Guys,

I am working on one project where i want to put validation on particular metadata like:

     The maximum character can be 10

     The value of an integer field can be between 1 and 10000

I know we can write one custom component(Filter- validateStandard) and stop it but the error will come after checkin action.

My requirement is I will call checkin service from SOAP or from new ADF user interface or UCM old interface and I want to implement maximum character validation for particular field.

Is there any process put any custom script on Rule?

I have created one Rule and add the metadata and put the below custom script on default section:


<$customFieldLength = getValue("#active", fieldName & ":maxLength")$>

But it's not working. Am I doing any wrong? I have got the above hint from Idoc Script ref guide:



  • Raja Kummathi
    Raja Kummathi Member Posts: 743 Silver Badge
    edited Sep 29, 2016 1:05AM

    Hi ,

    Add the below code into your rule

    <$custom_pre_complete_checkin_script = '

    <$include super.custom_pre_complete_checkin_script$>

    var checkinForm = document.getElementsByName("Checkin")[0];

    var page = checkinForm.xTestFlow;

    if (type.value == null || type.value.length == 0) {

    alert("Test Flow is required");




    <$setResourceInclude('custom_pre_complete_checkin_script', custom_pre_complete_checkin_script)$>


  • Caleb Ely
    Caleb Ely Member Posts: 242 Bronze Badge
    edited Sep 29, 2016 8:07AM

    Try adding this to your config.cfg and restart.


This discussion has been closed.