Dialog validation regex negative lookbehind is not working

It seems like Negative Lookbehind regex stopped working after upgrade from Ivanchuk-1 to Ivanchuk-4. Current version: ivanchuk-4.20190911145513_9f959bd




When I remove value from dialog and fill it with some value it shows “This field is required”:

I could not find any errors in the logs.
Can someone check on your systems if this is the case or it’s on my side?

Thanks in advance,

The issue is specific to Firefox Browser (tested on 76.0.1). The same regex works fine in Chrome.

@tonic Negative lookbehind is not supported in Javascript regex (if you click ECMAScript in your regex101 link there you will see it will fail)

This used to work, I believe the regex I was given many years ago for validating hostnames:


Weird that it would change in a minor release. @tonic and/or @james_ can you open a bug report issue?

My offhand guess is that somehow we weren’t doing client-side filtering and now we are, hence my Javascript observation.

I would not mind if it hasn’t worked at all. What I experience is that the same regex works in Chrome and breaks the dialog in Firefox.
@james_, with slight changes your regex has the same issue:


Firefox Console Error:

SyntaxError: “invalid regexp group”
validateField ui-components.js:3499
validateField ui-components.js:2876
changesHappened ui-components.js:2885
fn vendor-470328311e0f56c17d35.js line 1817 > Function:4
Angular 16

@Fryguy, i can create an issue, I guess it’s related to manageiq-ui-classic ?

Yeah, I think ui-classic makes sense for where to log the bug.

Summing up my response in the issue (https://github.com/ManageIQ/manageiq-ui-classic/issues/7050).

Ruby supports lookbehind,
JS doesn’t … yet.

We will never support this in IE11 (since gaprindashvili), but Firefox 78 does add the support.

Hi @himdel,

Thanks for reply. Firefox 78 is in beta yet, but good to know that support is coming. Would be nice to see an error in UI that some feature is not supported. As of now it gives a misleading message.

Oh, you’re right about that, that I can fix :slight_smile:

That looks great! Thank you!