Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to validate a custom field format on the customer portal

Gee Udobang November 6, 2020

Hi,

I want to ensure that when a customer is entering data into a custom field, it is the right data type/format e.g. phone numbers should be numbers maybe with special characters like + and (), and email addresses in the right field; i'm currently using text fields.

Can you please tell me if this is something i can do in JSD.

Cheers,

Gee 

2 answers

0 votes
Kate Caldecott
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2020

@Gee Udobang 

 

I see that you have accepted an answer but I also wanted to flag another option for you.  You could use the regex feature with ProForma Lite, a marketplace app that builds fully integrated forms within Jira (up to a maximum of 3 form templates for free).

You can apply the regex formula in the form template as displayed below:

Regex.jpeg




It would appear on the portal as a normal question


Hope that helps as another option.  To be be transparent, I am from ProForma.


Regards

Kate

Yuly Buenahora
Contributor
April 25, 2022

@Kate Caldecott finally how did you did it?

Is there a way to do that without external add-ons?

0 votes
Manuel Bastardo Castellano
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 6, 2020

Hi Gee, you need to apply behaviors to each field according to its type.

Behaviours JSD 

If you have not used it before look this Behaviours Tutorial, I recommend you start with basic validations such as

CF.isNumber() if you want to check if is a number. or CF.length to chek the number of characters in the field. Then for email you can try with Regexp to validate email.

Examples:

I hope it helps

Gee Udobang November 9, 2020

Hi Manuel,

Thanks a lot for your response, based on your answer, i'm assuming i would need to get Scriptrunner. Just so you know that i'm not a developer. So i'm not sure i'll be able to write the scripts. Is there no way to carry out the validation in JSD and just to confirm I used 'Extension for JSD' to create the custom fields. 

Cheers,

Gee

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events