Required Number of Digits/Characters

Hello,

I’m looking to require a specific number of digits or characters for an operator input. Is there a way to set this up?

Thanks!

Hey Lorenzo,

Thanks for posting in Tulip Community!

The best way to build this functionality will be to use Regular Expressions. Here’s an example app that I just built:

Here the input variable is called: idTest
The goal is to make sure the operator input’s an ID to idTest that is exactly 3 characters, and is made up of characters from A-Z.

Here’s the trigger I built to achieve that goal:

Examples:
‘ABC’ will match the RegEx, and the app will move to the next step
‘TR’ will fail the RegEx and show message.

Here’s a great RegEx resource: https://regexr.com/

Please let me know if you have questions about this!

Thanks,
Kailey

1 Like