cllor
November 9, 2021, 9:02am
1
Hi team,
I have try a set of regular expression on online tools.
The result perfect match with my input.
However, when I copy and paste the same things into RegexValidator, it shows me ERROR in Invalid ICU message. Missing '}'
^(+\d{3}\s)?(?\d{2,3})?\d{3,4}[\s]\d{4}?$
Try escaping all \ symbols with \\ - the Pattern property is a string. In addition you may need to create a page property and assign the pattern to it. Then set the Pattern property of the component to said page property.
cllor
November 9, 2021, 9:27am
3
Hi @korchev ,
This is another regexValidator that I used, and this pattern is working fine for me.
I did try also replace all '' with '\', but it still not working.
korchev
November 9, 2021, 11:21am
4
It seems that angular localization is having trouble parsing this property. Did you try my suggestion to use a page property instead?
cllor
November 10, 2021, 1:36am
5
Yes, I did try to set the regular expression in Page Property, after that set the property into the pattern field. But is still not working.
I realized that this type of regular expression is working in Radzen \d (.\d+)?$ *
But ^(+\d{3}\s)?(?\d{2,3})?\d{3,4}[\s]\d{4}$ is not working.
The different between them is { }. Any way to handle this?
korchev
November 10, 2021, 5:58am
6
What isn't working? Are you still getting the ICU message error?
cllor
November 10, 2021, 7:38am
7
This time is getting another error.
korchev
November 10, 2021, 8:05am
8
Did you put quotes around the regexp pattern? Check the generated code.