I want to limit Character count of String input type in a user macro i am creating. Is there a way to do this?
thank you in-advance for your time and attention.
How is the string getting input? Do you mean in the macro options or do you have a text box on the page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately there doesn't seem to be any way to limit the macro options, but you could introduce an error message in the macro itself if the input is too long.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could probably do something like this:
#if ($paraminput.length() > 10)
<div class="aui-message aui-message-error">
<p class="title">
<strong>Error</strong>
</p>
<p>Macro parameter "input" must be 10 characters or less!</p>
</div>
#else
... rest of code ...
#end
This example is taken from AUI, the Atlassian User Interface guidelines:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.