Is it possible to use a Handlebars helper to validate the Length of the string, in a smartdocs template

Hi Team,

As per the comment from https://community.apigee.com/questions/42144/handlebarsregisterhelper-smartdocs-template.html we can not register Handlebar helpers. I would like to check the length of string from list of my parameter names which I have is huge. Do we have any solution to overcome?

Regards,

Veera

0 2 831
2 REPLIES 2

Is Anybody give the right answer for this?

Hi - I think you cannot register a helper within a template.

To clarify: while it is not possible to register a helper from within the template itself, it is absolutely possible for you to register one or more Handlebars helpers from within an additional Javascript module that augments the builtin smartdocs JS.

Does this help? You need to add the appropriate JS file to your devportal, and then ... bob's your uncle!