Hello !
I have a problem with the IsMatch function in my app.
What I'm trying to acheive is to force the user to respect a certain format when typing in a textbox like so : 2numbers, 1letter, 3numbers (e.g. 12A34).
My issue is that the letter has to specifically be either P or F, so I tried to force a choice with "Or", but Or only returns "false" and not one of the values.
My code looks like this : (in OnChange of DataCardValue8)
If(
IsMatch(
DataCardValue8.Text;
"\d{2}" & ("P" Or "F") & "\d{3}" ;
MatchOptions.Complete
);
true;
Notify(
"Error";
NotificationType.Error;
15000
);
Reset(DataCardValue8)
)
If I only put either of the letters it works fine, so I don't know why it doesn't work when multiple values don't work.
Help is greatly appreciated, even if it's to tell me it's impossible etc...
Thanks !