Hi!
Which script/plugin I should use if we would like to validate if inserted value in custom field (Text field - Single line) matches with the IBAN standard criteria:
1) The number starts with a two-digit country code
2) then two numbers, followed by up to third-five alphanumeric characters
3) We need to use it on the help center customer portal form
I did read the community about ScriptRunner - is this the correct plugin and if yes - is there any scripts database where to find such specific script?
Scriptrunner is a definitely a good solution, particularly if want to work with just a few custom fields; however, you might also consider ProForma (I'm the product manager) as you can build dynamic forms that can be displayed on the portal. These forms can include different types of validation requirements including regex. You can try it for yourself on the instant demo here: https://proformademo.thinktilt.net
The particular Regex pattern you are looking for is: ^[A-z]{2}[0-9]{2}[A-z]{3}$
Here is a quick example of a form with regex
Thank You for the feedback. Is this functionality only available in Proforma and not in Proforma Lite?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This functionality is available in both @Kaur Joakit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am a fan and user of both Scriptrunner and ProForma. However, if this is the only thing you need to do, there is a free app that will allow you to create a custom field with a regex validation:
I have no relationship to the developer, so I only mention it as another option for you to explore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scriptrunner is a good option (I would say that of course, I work for Adaptavist). There are other apps that can do validators of course.
https://scriptrunner.adaptavist.com/latest/jira/tutorials/scripted-validators-tutorial.html is a starting point if you want to do it with a validator, but behaviours might be an option too.
Lots of examples in the library for it too, although none that do what you need, they should show you the basics of it. https://library.adaptavist.com/search?page=1&products=jira&term=validator as a start.
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.
Hi @Nic Brough -Adaptavist- !!! I know I'm late to the party, but any chance you have a link to sample behaviour script for doing a regex check on a custom field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- think I figured it out!
def FieldName = getFieldById(getFieldChanged())
def val = FieldName.getValue() as String
if (!val.matches("[-._a-zA-Z0-9]{0,50}"))
{
FieldName.setError("Topic Name must be 50 chars or less, can NOT contain spaces, and can ONLY contain dashes, dots, and underscores for special chars")
}
else
{
FieldName.clearError()
}
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.