I am facing a very weird issue with regex in my confiform. I am a beginner of Regex.
I have a text field in my confiform where I have put a rule below in the field definition's validation field itself to accept only two email ids and below is the rule which works fine and block if more than two email ids are entered:
In addition I was asked to enter a rule on the same field that only certain domains should be allowed so I inserted a new validation rule macro on this field separately within the form with below to say that apart from these two domains don't allow anything else:
Both of them works independently well but when I have both rules in place(one within the field definition and one as a separate rule definition macro)below is happening:
1. When some one enters some other domain(apart from the two I have configured) and three email ids, the error shows first is the one to say that there are more than two email ids and once I removed the third email id, the domain rule doesn't work
2. If I have only two email ids and if one of them is external domain then domain rule works and throws error stating there is an external domain as expected
Kindly help me on how I can combine and get both of them worked fine
I tried various regex but nothing that work on the site is working on confiform.
I am now trying to have a multi user field to allow members to select user ids and putting a entry.user.email to pick the email id of the user. I am having a requirement now where I should restrict the number of users selected is to just 2 users. Is that possible?
Could you share the examples of what is working on a site and doe snot work in ConfiForms?
Not sure I understand the part about multi-user field - how is this connected to regexps?
I guess it is not... To check the number of selected users in a field you can use an asCount https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions and https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-Validationrule
Setting the condition to be something like
And then put the parameter value in the "Message to show when validation fails"
Hello Community! Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...
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