When placing that RegEx into the inline event for a button control, I observed the same behavior.
I tried a few variations that didn't work, but was able to get something working by creating a function in a Custom HTML control and then calling that function in the on click event of the button. I was writing this up to send and managed to find the reason we observed the original behavior.
https://www.ibm.com/docs/en/baw/20.x?topic=properties-user-defined-eventsAt the bottom of the above link, you will see a note that we need to have \\d instead of \d in the RegEx. So what we saw with it always returning false was because it wasn't interpreting the RegEx as expected and when it was evaluated, it was just
/^d{8}$/
The following works as you expected
console.log('testing:', /^\\d{8}$/.test("25138987"));Given this though, I would probably just keep the RegEx in a function on the coach via the Custom HTML control, or better yet, as a part of whatever validation function you plan to run on your composite coach views for better reuse.
------------------------------
Rackley Boren
------------------------------