SJEaton Posted March 24, 2019 Share Posted March 24, 2019 Hi Is there a RegEx validation to limit a monetary amount e.g we don't want them a customer to enter more than £1500 in a field. Is this possible? Are there any regex examples /guidance published on wiki?? Sam Link to comment Share on other sites More sharing options...
Bob Dickinson Posted March 24, 2019 Share Posted March 24, 2019 Hi @SJEaton Try this: \b([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|1[0-4][0-9]{2}|1500)\b A useful utility to generate regex for numeric ranges can be found here: http://gamon.webfactional.com/regexnumericrangegenerator/ We don't have any formal documentation around useful regex on the Wiki but this is a good suggestion, so I'll ask internally if there is anything we can put together as a starting point. It would be also be very beneficial to see what other community users use as part of their configurations. For those reading this, please feel free to post here if anyone has regex that they regularly use that may be useful to others! Kind Regards Bob 2 Link to comment Share on other sites More sharing options...
SJEaton Posted March 25, 2019 Author Share Posted March 25, 2019 Thanks @Bob Dickinson! Link to comment Share on other sites More sharing options...
HGrigsby Posted July 11, 2019 Share Posted July 11, 2019 Hi Is there a way to limit the amount of characters entered into a field? I've had someone paste in a load of references into a single line text field. We only expected one or maybe 2 reference numbers to be supplied It lets the text go into the field, then stops the BPM as that field is used in the summary and it gives an error about the summary being too long. I'd like it to only allow a certain amount of characters and then give a warning. In the meantime I can put something in the description to try and stop them while I think about how to change the PC Any ideas or suggestions welcome! thanks Helen Link to comment Share on other sites More sharing options...
Dan Munns Posted July 16, 2019 Share Posted July 16, 2019 @HGrigsby this should work: ^.{0,30}$ Just change the second number to the max characters you want to allow. It wont catch white space if it is at the beginning or end of the string though so you might need to make some adjustments for that if you are sailing close to the field character limit. 1 Link to comment Share on other sites More sharing options...
HGrigsby Posted November 11, 2019 Share Posted November 11, 2019 Thank you @Dan Munns missed this reply but it works perfectly, I forgot about it until the same error came up the other day. Helen Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now