Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,739
Community Members
 
Community Events
168
Community Groups

Can anyone help me with regular expression check on jira behaviors

Edited

I am not getting a way for regular expression check on jira behaviors. ca someone help with the syntax on the same

I have tried as below, but it is allowing [A-Z] even

FormField ABP = getFieldById(getFieldChanged())
String ABPVal = ABP.getValue();


def regex= /[a-z]*/
def match = (ABPVal=~ regex);

if(ABPVal =~regex )

{
ABP.clearError()
}
else{
ABP.setError("No no")

1 answer

I have tried as below, but it is allowing [A-Z] even

FormField ABP = getFieldById(getFieldChanged())
String ABPVal = ABP.getValue();

def startsWithSpace=ABPVal.toString().startsWith(' ');
def regex= /[a-z]*/
def match = (ABPVal=~ regex);

if(ABPVal =~regex )

{
ABP.clearError()
}
else{
ABP.setError("No no")

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events