Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I need to collect user mobile numbers from custom field


I need to collect user mobile number from the custom field (Text filed).

When users entered Alphabets system throws error message under the custom filed,

Need groovy script for this condition.

Kindly help me



2 answers

2 accepted

1 vote
Answer accepted
brbojorque Community Leader Jan 03, 2020

Hi @Thangavel VELUCHAMY ,

Please check this Behaviour Script below, it is a very generic validator using regex, you can formulate your own pattern using other tools like so below.


Add this script to the Telephone field in the Behaviour.

def customField = getFieldById(getFieldChanged())

def pattern = /\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})/
def errorMessage = "Not a valid phone number, you must enter the proper format e.g (111) 222-3333"

def matcher = customField.getValue() =~ pattern

0 votes
Answer accepted

Hi @Thangavel VELUCHAMY 

You can use the 'Number Field' type for the custom field instead of Textbox.
So the user will be allowed to enter only numerals.

You can add a help text for the field just to inform the users for any format to be followed, though the format will not be checked by Jira.


Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you