What I'm trying to do is restrict a custom property text box so that the user can enter a max of 5 characters. Is there a way to validate? Using regex?
Thanks,
Jake
Sure, the expression I used in vCAC for my text box was: ([a-z,A-Z,0-9]{1,5})
The first part of the expression [a-z,A-Z,0-9] states that the letters A-Z can be used, lower or upper case, as well as the numbers 0-9. The second section {1,5} controls the length, as the entry must be between 1 and 5 characters total to validate.
If you plug it in to the site I mentioned above you can test your expression and how it evaluates.
Hope that helps.
-Jake
I was able to figure it out using RegEx. This site was helpful to build the expression:
Hello, I was wondering if you could give an example of how you got this to work. I haven't worked with regex before and I have the same issue with needing to control what goes into a textbox (no special character, uppercase ect.).
Sure, the expression I used in vCAC for my text box was: ([a-z,A-Z,0-9]{1,5})
The first part of the expression [a-z,A-Z,0-9] states that the letters A-Z can be used, lower or upper case, as well as the numbers 0-9. The second section {1,5} controls the length, as the entry must be between 1 and 5 characters total to validate.
If you plug it in to the site I mentioned above you can test your expression and how it evaluates.
Hope that helps.
-Jake