You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using match() function in field validation, the regex definition containing backslashes must have these backslashed doubled to work.
For example, a single regex that should return true on digits: ^\d+$
throws an error:
if I define the digits in another way, it works fine: ^[0-9]+$
Adding a second backslash to the original regex seems to fix it: ^\\d+$
Expected Behavior
match() function should accept raw regex expression, without the need to double-escape special characters.
Steps To Reproduce
Create a text field
Add the following validation step: match(value, "^\d+$")
Environment and versions
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Version of Corteza
2023.9.4
Current Behavior
When using match() function in field validation, the regex definition containing backslashes must have these backslashed doubled to work.
For example, a single regex that should return true on digits:
^\d+$
throws an error:
if I define the digits in another way, it works fine:
^[0-9]+$
Adding a second backslash to the original regex seems to fix it:
^\\d+$
Expected Behavior
match() function should accept raw regex expression, without the need to double-escape special characters.
Steps To Reproduce
match(value, "^\d+$")
Environment and versions
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: