I have taken over from someone in the business and have a field with the following validation - ^[0-15]*$, i can see this is numerical and 15 characters acceptable. However, I now need to make this 15 characters to accept both text and numbers...
The expression I think you might want for what you're trying to do is:
^[0-15]*[a-z]*[A-Z]*$
However, as it stands it looks like this would only let you input 0, 1 or 5 (as well as any letter), so you'd probably want something more like:
^[0-9]*[a-z]*[A-Z]*$
Which will let you input any number at all, and doesn't restrict the length or how big the number is; if you need to restrict the length to 15 characters the expression would be:
(?=^.{0,15}$)(^[0-9]*[a-z]*[A-Z]*$)
Regular expressions are....kind of arcane and complicated, but they can be pretty powerful :).
New User, need help with field validation
Hi all,
I have taken over from someone in the business and have a field with the following validation - ^[0-15]*$, i can see this is numerical and 15 characters acceptable. However, I now need to make this 15 characters to accept both text and numbers...
Help?!!?
Thanks in advance
Hi!
The expression:
Is a regular expression (I assume this is on an Umbraco Forms field?) - you can test these here:
https://www.regextester.com/
The expression I think you might want for what you're trying to do is:
However, as it stands it looks like this would only let you input 0, 1 or 5 (as well as any letter), so you'd probably want something more like:
Which will let you input any number at all, and doesn't restrict the length or how big the number is; if you need to restrict the length to 15 characters the expression would be:
Regular expressions are....kind of arcane and complicated, but they can be pretty powerful :).
Hi Chris, thanks a lot... saved me a bit of pain while I am trying to get up to speed with things on here!
I have it working! thanks so much....
is working on a reply...