Help with regulare expression syntax

Hi all,
i think i saw the page with information about the syntax for input validation of a text field with a RegEx long time ago, but now i can’t.
So i’m sorry to ask again:
what is the correct syntax to check the input format of a text field (f.e. for a serial number with [0-9],[a-z],[A-Z] and special characters [-_]. No blank or others

Thanks
Chris

hello @ChrisF!!

one of the ways to verify for the data that’s been entered is by checking for the data input on a trigger. for example, the following Trigger will check that the data has been entered to start with 5 numbers, using the following RegEx ^[0-9]{5}:

this would result in:
Screen Recording

in case you’re not familiar, the following site is very useful to help build Regular Expressions: https://regex101.com/.

let me know if this helps!!

1 Like

great support!
Yes it works and with the given link i can realize the request.

But i’m running in an error when i’m trying to change the background color of the field in addition:


image
The variable c_SNrGetriebe is from the type “color” and should switch to red or green. I copied the code from an other app where it works, but in this app i get always the error "error processing trigger “next” in the line with the data manipulation/store/

Do you have any idea why i get this error?
Regards
Chris

that’s interesting @ChrisF, thanks for sharing. I am not 100% certain as to why you are getting that error message but may have to do with the fact that the Trigger was copied from another app, I have asked the engineering team to look into this.

in the meantime, could you re-create the Button and associated triggers and let us know if that works??

thanks!!

Hi gio,
i have created a new button with a new trigger and wrote the if-then-cause query again…with the same error result :frowning:

Regards
Chris

hello @ChrisF, thanks for helping us get to the root cause of what is happening here. the engineering team has not been able to reproduce the issue with the use of Developer Mode :link:. could you confirm you have the latest version of the Player installed??

if that is the case, and the issue persists, can you send an email to support@tulip.co with the logs from the Player?? you can get them by navigating to Developer > Toggle Developer Tools.

thanks

Hi Gio,
the player was not actual, but after updating the first few time the error occur again, but then vanished.
I see that i have new test modus “test”? Great for debugging.

I will take care about the error but hope this error is gone :slight_smile:
Thanks for the support
Chris