Hello All,
Good day.
My name is Kareem. I need help with creating a validation pattern.
Following is my requirement:
The field value should be either of the following:
"12/345/67890" or "3012034567890" or you can leave this field blank
Here the numbers can be anything in between 0 to 9.
Can anyone help me with the pattern?
Also, if I am not at the right place to ask the question, please guide me how and where to get the answer for the above question.
Thank you.
Which product is this about please? Jira? And are you validating this with a plugin or some default functioanlity?
Here is a regex:
([0-9]*\/?)*
It matches any amount of numbers between 0-9 with optional forward slashes.
You were not very specific with the requirements but I hope it helps :-)
Thank you, Charlie.
I work with SAP Ariba tool. And we have a Tax meta data file which we import into the system.
This particular tax validation pattern is for GERMANY tax code DE1 which is Germany: Tax number (Steuernummer).
If you could help, then, I need the pattern which should allow the format as: "12/345/67890" or "3012034567890" or you can leave this field blank.
The validation pattern should allow the above mentioned formats (both) and also should allow the blank values.
Please let me know if you need further information.
Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I forgot to mention the that pattern should restrict to the above format.
For example: 12/345/67890 should be exactly like this meaning before the first forward slash the pattern should allow only 2 numbers (any numbers from 0-9) and after the first forward slash it should only allow 3 numbers (any numbers from 0-9) and after the second forward slash it should only allow 5 numbers (any numbers from 0-9).
Then, for the second format (3012034567890), the regex should only allow 13 numbers (any numbers from 0-9).
The regex pattern should also allow blank values meaning even if we do not populate the field for the GERMANY tax code DE1 the regex should allow this.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Ok so this is not about any Atlassian tools? I suggest to use stackoverflow or other generic community forums in the future ;-)
For your regex, try this:
^([0-9]{2}\/[0-9]{3}\/[0-9]{5}$|^[0-9]{13}$|^$)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much, Charlie.
I will keep in mind to use Stackoverflow.
Thanks again.
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.