I have a requirement for a regex field that accepts a 9 digit number separated by a comma that can be used for more than 1 group of 9 digit numbers.
Behind the scenes one of our systems can pick this these numbers as long they are separated by a comma
1. We don't know exactly how many groups of 9 digit numbers an end-user will put in it could once or it could be 10 times (the 9 digit numbers are product ID's)
2. If an end-user inputs only one ID e.g. 333444555 they may not use a comma can we force the comma? Or make the comma optional?
3. If they input more than one ID the last ID will need to end on a comma can we force this or again make the last I.D have an optional comma at the end?
The system we can set to pick up whatever is the best option for the rubular within the regex field.
After trying like a million times using rubular I have not been able to find the best method to fit my requirements.
Would anyone else have any idea how I could make this work?
Thank you very much!
Please sign in to leave a comment.